Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

array to string conversion in php

$person = [
    'name' => 'Jon',
    'age' => 26,
    'status' => null,
    'friends' => ['Matt', 'Kaci', 'Jess']
];

echo json_encode($person);
// {"name":"Jon","age":26,"status":null,"friends":["Matt","Kaci","Jess"]}
Source by www.dyn-web.com #
 
PREVIOUS NEXT
Tagged: #array #string #conversion #php
ADD COMMENT
Topic
Name
6+9 =