what output do you get here?
Top Questions
www.w3answers.com
w3answers.blogspot.com
<?php
$array=array(5,5,5);
echo $r=array_pad($array,5,2);
?>Ans:Array
NOTE:
use 'foreach($r as $v)' then try to output value 'echo $v' or use Print_r($r)
so if we make above script as
<?php
$array=array(5,5,5);
$r=array_pad($array,5,2);
foreach($r as $v)
echo $v;
?>We get the output as 55522
Post new comment