Snippets tagged “associative-array”
12 snippets use this tag.
- Best way to document Array options in PHPDoc?PHP
When documenting an array option in PHPDoc, you can use the @var tag followed by the type array and a short description of the option.
- Get URL query string parametersPHP
To get the query string parameters in PHP, you can use the $_GET superglobal array.
- How to access mysql result set data with a foreach loopPHP
To access MySQL result set data with a foreach loop, you can use a loop like the following:
- How to Convert a PHP Object to an Associative ArrayPHP
If you want to get a proper explanation of how to convert a PHP object to an associative array, you are in the right place. Just follow the examples.
- How to convert a string to JSON object in PHPPHP
You can use the json_decode function in PHP to convert a JSON string into a PHP object.
- How to Convert MySQL Data to JSON with PHPPHP
If you wonder how to find a proper way of converting MySQL data to JSON format using PHP, then you are in the right place. Read on and check the example.
- How to get info on sent PHP curl requestPHP
To get information about a cURL request that you have sent using PHP, you can use the curl_getinfo() function.
- How to JSON Decode a String into an Array with PHPPHP
This is a short guideline that provides comprehensive information on how to decode a JSON string into an array with the help of PHP.
- How to print all properties of an objectPHP
To print all properties of an object in PHP, you can use the get_object_vars function, which returns an associative array of an object's properties.
- Is there Java HashMap equivalent in PHP?PHP
In PHP, the equivalent to a Java HashMap would be an associative array.
- Parsing domain from a URLPHP
To parse the domain from a URL in PHP, you can use the parse_url function, which will return an associative array containing information about the URL.
- PHP json_decode() returns NULL with seemingly valid JSON?PHP
There are a few possible reasons that json_decode() might return NULL when given what appears to be valid JSON.