I have an issue with adding value at the first position in an associative array, i've tried googling on the internet, used several methods to add a value but still it's not adding the value at the first position.
what i tried is
array_unshift($output_countries['CountryName'], "India");
but it doesn't work
my PHP code:
while($rows_fetch_country_list = mysql_fetch_array($query_country_list)) {
extract($rows_fetch_country_list);
$output_countries[] = array(
"CountryName" => $country_name,
"CountryCode" => $country_code,
"Id" => $pk_country_id
);
}
any suggestions? thanks!