0
jabber posted
foreach passing refrence in php
i want to change the
$products=array("Iphone","Samsung Galaxy","Google Pixel");
foreach($products as $key=>$value)
{
$value= $key."-".$value
}
print_r($products);
i want result like 1-iphone etc.. but it print as it is same array.
not changing the value if we change in foreach
i dont know i clearly explain my problem or not . let me know if need more detail