Setting an array element to a variable
Posted: Wed Jul 26, 2006 10:22 am
When I run this code:
the varibles that I am trying to put values to are not getting set. If I echo $arrResponse[0] it writes fine. But if I echo $response it writes nothing. Is this the wrong syntax to give these variables array element values?
Code: Select all
$arrResponse = explode("&", $response);
$products = $arrReponse[0];
$avail = $arrReponse[1];
$billtype = $arrReponse[2];
$phone = $arrReponse[3];
echo $response . "<BR><BR>";
echo $prodcuts . "<BR>";
echo $avail . "<BR>";
echo $billtype . "<BR>";
echo $phone . "<BR>";