About 11,400,000 results
Open links in new tab
  1. PHP array_keys() Function - W3Schools

    The array_keys () function returns an array containing the keys. Required. Specifies an array. Optional. You can specify a value, then only the keys with this value are returned. Optional. …

  2. How to define a custom key in PHP arrays? - Stack Overflow

    Dec 22, 2013 · For a two dimensional array, you can define them like this $myarray = array(); $myarray[$key] = array(); $myarray[$key]['John'] = 'some value'; $myarray[$key]['Jane'] = …

  3. PHP: array_keys - Manual

    array_keys — Return all the keys or a subset of the keys of an array. array_keys () returns the keys, numeric and string, from the array. If a filter_value is specified, then only the keys for …

  4. PHP array_keys () Function - GeeksforGeeks

    Jun 20, 2023 · The array_keys() is a built-in function in PHP and is used to return either all the keys of and array or the subset of the keys. Syntax: array array_keys($input_array, …

  5. PHP Arrays - W3Schools

    In this tutorial you will learn how to work with arrays, including: Array items can be of any data type. The most common are strings and numbers (int, float), but array items can also be …

  6. PHP: Arrays - Manual

    Arrays. An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several different uses; it can be treated as an array, list …

  7. How to create an array with key value pairs in PHP?

    Sep 23, 2024 · In PHP, an array with key-value pairs is called an associative array. It maps specific keys to values, allowing you to access elements using custom keys rather than …

  8. PHP: array - Manual

    Read the section on the array type for more information on what an array is, including details about the alternative bracket syntax ([]). Syntax "index => values", separated by commas, …

  9. PHP array_keys () Function

    First, define an array that contains three numbers. Second, use the array_keys() function to get all the keys of the $numbers array. Third, display the keys. Since the $numbers is an indexed …

  10. Mastering PHP’s array_keys() Function - CloudDevs

    Aug 9, 2024 · Whether you’re working with associative arrays or indexed arrays, array_keys() can help you extract and manipulate the keys of an array efficiently. In this guide, we’ll dive deep …

  11. Some results have been removed