why not worked str_replace? what do i do?
$date = $this->convert_date->JalaliToGregorian('1390','04','20'); ->> this output with json_encode -> [2011,7,11]
$da = str_replace(",","/",$date);
echo json_encode ($da) ->> output Array ["2011","7","11"]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The commas are not in the array. That’s being added by json_encode. Try
implode("/", $date);That will combine the three array elements using/as glue.Implode Documentation