[ create a new paste ] login | about

Link: http://codepad.org/AVfZS3qO    [ raw code | output | fork ]

PHP, pasted on Nov 24:
1
2
3
4
5
6
7
8
<?
$string = 'string';
$arrayWithOneElement = array('one');
$arrayWithTwoElements = array('one', 'two');

echo "string : ".count($string)." - ". implode(', ', $string) ."\n";
echo "array with one element : ".count($arrayWithOneElement )." - ". implode(', ', $arrayWithOneElement ) ."\n";
echo "array with 2 elements : ".count($arrayWithTwoElements )." - ". implode(', ', $arrayWithTwoElements ) ."\n";


Output:
1
2
3
4
5

Warning: implode(): Invalid arguments passed on line 6
string : 1 - 
array with one element : 1 - one
array with 2 elements : 2 - one, two


Create a new paste based on this one


Comments: