Where can I find reliable PHP tutorials for working with arrays and JSON?

To find reliable PHP tutorials for working with arrays and JSON, you can refer to websites like PHP.net, W3Schools, and tutorialspoint. These resources offer comprehensive tutorials and examples on how to manipulate arrays and encode/decode JSON data in PHP.

// Sample code for working with arrays and JSON in PHP
$data = array(
    'name' => 'John Doe',
    'age' => 30,
    'email' => 'johndoe@example.com'
);

// Convert array to JSON
$json_data = json_encode($data);

// Decode JSON back to array
$decoded_data = json_decode($json_data, true);

// Accessing values from the decoded array
echo "Name: " . $decoded_data['name'];
echo "Age: " . $decoded_data['age'];
echo "Email: " . $decoded_data['email'];