array_values() in php
PHP array_values() is an inbuilt function that returns all the values of an array and not the keys. The array_values() function returns the array containing all the values of an array. The returned array will have the numeric keys, starting at 0 and increase by 1
<?php
$a=array("Name"=>"ankur","Age"=>"25","Country"=>"India");
print_r(array_values($a));
?>
Output:
Array ( [0] => ankur [1] => 25 [2] => India )
for more visit:
https://appdividend.com/2019/05/09/php-array-values-example-php-array_values-function-tutorial/#:~:text=PHP%20array_values()%20is%20an,0%20and%20increase%20by%201.
https://www.w3schools.com/php/func_array_values.asp
/*
I hope it will help you.
Thank you _/\_
*/<?php
$array = array("size" => "XL", "color" => "gold");
print_r(array_values($array));
?>
// ["XL","gold"]
Also in PHP:
- THROW EXPECTION PHP
- date phhp
- HOW TO GET LAST INSERTED ID FROM TABLE IN SQL IN CODEIGNITER
- create random_str laravel
- carbon diffforhumans
- find array key value by check key
- 20210329 to date format php
- 413 error laravel
- Wordpress login page Background Image / Logo Image
- convert date and time to time stamp phph
- find ip address with php
- associative array example
- database connectivity in php
- cron job for backup in laravel 5.4
- fatch time from database and add in current time in php
- default mkdir permissions php
- comparacion cache laravel
- create folder with php
- ErrorException Allowed memory size of 536870912 bytes exhausted (tried to allocate 400560128 bytes)
- data type php display
- clear server cache laravel
- <?php function webmull($webmull) { switch ($webmull) { case 'e': print('5'); break; case 'm': echo('6'); break; case 'b': continue; break; default: echo '7'; break; } } webmull('w'); webmull('e'); webmull('b'); webmull('m'); ?>
- 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php
- How do you clear cache in Laravel?