No estoy muy acostumbrado a php y necesito colocar un clave-valor a un objeto. Tengo esto:
{"5ba68024f109b61fe95ccd02":"asistent","5bd0c379f109b673c11c9502":"seller","5be0addcf109b64c847abd26":"coder","5be0b26af109b64c847abd2c":"teacher","5becab8cf109b676d935e289":"engineer"}
Necesito colocar al principio esto:
"no_job":"Please select an option"
Es decir, al final tendria algo como esto:
{"no_job":"Please select an option", "5ba68024f109b61fe95ccd02":"asistent","5bd0c379f109b673c11c9502":"seller","5be0addcf109b64c847abd26":"coder","5be0b26af109b64c847abd2c":"teacher","5becab8cf109b676d935e289":"engineer"}
Intente con:
$job_list["no_job"] = "Please select an option";
array_unshift($job_list, $job_list["no_job"]);
Sin embargo el dato es duplicado al final:
{"no_job":"Please select an option", "5ba68024f109b61fe95ccd02":"asistent","5bd0c379f109b673c11c9502":"seller","5be0addcf109b64c847abd26":"coder","5be0b26af109b64c847abd2c":"teacher","5becab8cf109b676d935e289":"engineer", "no_job":"Please select an option"}
Que me recomiendan hacer?