1 2 3 4
<?php foreach($final as $key => $val) { if (is_array($val) && count($val) == 1) $final[$key] = $val[0]; ...
PHP convert single itemed sub-a...
by paulswansea.myopenid.com,
August 25, 2010 20:45,
No refactoring, tagged with php, multidimensional-array, 2d array
I tried using array_walk to...
1 2 3 4
<?php
public function get_usd_value($date)
{
...
PHP What is bad in this code?
by https://www.google.com/accounts/o8/id?id=AItOawk89fkb9x-moiNmY07jOpKHwIT1tUTiK6M,
August 17, 2010 15:53,
1 refactoring, tagged with php, array, array string loop each
I know that variable naming...
1 2 3 4
class FormComponents
{
/*
...
PHP HTML Select Menu Template
by letseatfood.myopenid.com,
August 11, 2010 02:28,
1 refactoring, tagged with php, template, html, select_tag
This method outputs a stand...
1 2 3 4
<?php $text = htmlentities($_POST['text']); ...
PHP Sanitizing a submitted Foru...
Lets say I am building a fo...
1 2 3 4
<?php //Instantiate Router instance $router = new Router(); ...
PHP Router class for determinin...
Hi, this is my first time p...
1 2 3 4
<?php class MyClass { ...
PHP Exception handling
by xrstf.myopenid.com,
July 20, 2010 16:30,
1 refactoring, tagged with php, exceptions, transactions, pdo
I've got this pattern all o...
1 2 3 4
<?php function cat_paging() { ...
PHP Set apart this function to ...
I want to setapart paging l...
1 2 3 4
<?php function canlink() { echo '<link rel="canonical" href="http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . '" />'; ...
PHP Canonical Link Code | Remov...
by Bryan Hadaway,
May 28, 2010 08:07,
2 refactorings, tagged with query, link, remove, clean, canonical
Take a look at what I've wr...
1 2 3 4
<?php function shorturl($url){ $length = strlen($url); ...
PHP Short URL Function with PHP
A code block for php coders...
1 2 3 4
<? # Domain Name Variable ...
PHP Check Server Status with PHP
by arthurkingman.myopenid.com,
May 06, 2010 13:07,
6 refactorings, tagged with php, check server status
Here's server status checke...
1 2 3 4
<?php // char coding ...
PHP Get Meta Information of an ...
by arthurkingman.myopenid.com,
May 01, 2010 20:52,
1 refactoring, tagged with php, get meta information, get url information
Hello Php Coders,
It'll ...
1 2 3 4
function validateIban($value) {
$iban = false;
$value= strtoupper(trim($value));
...
PHP IBAN Validation with PHP
Here's the Php code block t...
1 2 3
<-- This is the form code from the parent html page-->
...
PHP Post resending with parent ...
by majeef.myopenid.com,
April 16, 2010 17:37,
1 refactoring
I have a simple shoutbox th...
1 2 3 4
$debates = ORM::factory('debate')->with('user')->with('category');
// what debates are we showing?
...
PHP Code seems inefficient. Sug...
by openid.aol.com/bduelz,
April 13, 2010 06:42,
1 refactoring
User profile page. Want to ...
1 2 3 4
public function view($id = 0)
{
$debate = ORM::factory('debate')->with('user')->with('category')->find($id);
...
PHP Better way to check whether...
by openid.aol.com/bduelz,
April 13, 2010 06:14,
2 refactorings
Code for a view debate page...
1 2 3 4
/* IBAN Validator * Jack ODERMAN * OPENGL License */ ...
PHP Iban Validation with Php
by jackoder.myopenid.com,
April 04, 2010 14:56,
No refactoring, tagged with php, iban validator, validate, iban
Hello Php Coders,
You ca...
1 2 3
<?php function clean($string){ ...
PHP Register/Login Script
by penaf.myopenid.com,
March 12, 2010 23:45,
13 refactorings, tagged with login, register, mysql, php
Hello People,
This websi...
1 2 3 4
<?php function get_title($html_page) { ...
PHP Get Title of HTML page
Extract and return the bits...
1 2 3 4
<?php function get_handle($type) { ...
PHP Return the appropriate file...
This method feels like it's...
1 2 3 4
<?php function getAge($birthdate) { return floor((time() - strtotime($birthdate))/(60*60*24*365.2425)); ...
PHP How to get age from given b...
by gordon0580.myopenid.com,
February 08, 2010 04:30,
1 refactoring
How to get age from given b...
1
$outputstr = preg_replace('/[-]{2,}/','-',trim(strtolower(str_replace(' ','-',preg_replace('/[^A-Z0-9- ]+/i','',$inputstr))),'-'));
PHP Trimming excess from string
by paulswansea.myopenid.com,
February 05, 2010 16:07,
4 refactorings, tagged with php, regex, replace
I'm trying to get an input ...
1 2 3 4
?y{?8S8IRon_SoDZoP();I?y
5
5{?8S8IjcI(I$8DRoZI{I
...
PHP Need help with index.php
by gperiard.myopenid.com,
January 14, 2010 15:30,
5 refactorings
Hello, I need help with my ...
Hello coders,
I'll share...