Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to loop with while in php for array associative

$assocarray = array('a' => 1, 'b' => 2, 'c' => 3);
$keys = array_keys($assocarray);
rsort($keys);
while (!empty($keys)) {
    $key = array_pop($keys);
    echo $key . ' = ' . $assocarray[$key] . '<br />';
};
Comment

PREVIOUS NEXT
Code Example
Php :: laravel compare date timestamp 
Php :: php time() 
Php :: laravel url download file 
Php :: Eloquent where date methods 
Php :: firebase php 
Php :: laravel mail send flexible subject 
Php :: php.hello 
Php :: generate entities symfony 
Php :: how to disable opcache 
Php :: php send http request 
Php :: wp order archive page post by title 
Php :: how to pass token with post request laravel 
Php :: php read from mariadb 
Php :: how to check if all values in an array are equal php 
Php :: php mail in localhost wamp 
Php :: php undefined function mysqli_fetch_all() 
Php :: woocommerce_order_status_changed add action 
Php :: route laravel Target class [AuthController] does not exist 
Php :: how condition for multiple row by orwhere laravel 
Php :: send json reponse php 
Php :: insert value in session in laravel 
Php :: laravel the requested url was not found on this server 
Php :: array to string conversion php 
Php :: $loop laravel list 
Php :: The uploaded file exceeds the upload_max_filesize directive in php.ini. 
Php :: url segment laravel 
Php :: php upload multiple files 
Php :: switch php version ubuntu 20.04 
Php :: laravel vue browser cache auto clear 
Php :: php execute command and display output 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =