php - display elemenrt of array error -
array in php generate error
$array[]= array("usman","ali"); echo $array[0]; it return error notice: array string conversion in d:\xx\xamp\htdocs\array.php on line 2 array plz wrong these code of block.but i'm wanted create array , display there element... these line of code copy php.net , wroking fine.
$array = array("foo", "bar", "hello", "world"); echo $array[0];
the line:
$array[]= array("usman","ali"); doesn't think - add new element $array variable contains array.
to define new 1d array try instead:
$array = array("usman","ali"); or see structure of 2d array created this:
print_r($array);
Comments
Post a Comment