Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to convert array to string in php

/ Declare multi-dimensional array 
$value = array( 
    "name"=>"GFG", 
    array( 
        "email"=>"abc@gfg.com", 
        "mobile"=>"XXXXXXXXXX"
    ) 
); 
  
// Use json_encode() function 
$json = json_encode($value); 
  
// Display the output 
echo($json); 
  
?> 
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #convert #array #string #php
ADD COMMENT
Topic
Name
2+2 =