adspace


can we pass variable in array to traverse it?

Answer Posted / Daya Shankar Yadav

Yes, you can pass a variable into an array in PHP. Here's an example:

$myArray = array('apple', 'banana', 'orange');
$fruit = $myArray[1]; // This assigns the value 'banana' to $fruit

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category