Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php foreach associative array

$arr = array(
  'key1' => 'val1',
  'key2' => 'val2',
  'key3' => 'val3'
);

foreach ($arr as $key => $val) {
  echo "$key => $val" . PHP_EOL;
}
Comment

PREVIOUS NEXT
Code Example
Php :: php get files in folder 
Php :: how to get time php with am/pm 
Php :: php artisan preset react 
Php :: get specific key value from array php 
Php :: DB::rollback() 
Php :: laravel migration add column after 
Php :: php carbon convert string to date 
Php :: tcpdf error unable to create output file in php 
Php :: php remove notice session already been started 
Php :: access config variable in codeigniter controller 
Php :: remove all spaces php 
Php :: get single row in codeigniter 
Php :: laravel 8 selecet the 2nd to the last record 
Php :: return response array laravel 
Php :: Composer detected issues in your platform: Your Composer dependencies require a PHP version "= 8.0.2". 
Php :: laravel module remove 
Php :: woocommerce action order complete 
Php :: HTML Snippets not working in .php files 
Php :: minuscule string php 
Php :: PHP CSV File Export Using fputcsv() 
Php :: php remove 1 day from date 
Php :: carbon finer 
Php :: file_get_contents url fail 
Php :: Using middleware auth laravel in controller constructor 
Php :: guzzle post request with data 
Php :: laravel maintenance mode 
Php :: array_search in php 
Php :: how to check if PHP-FPM is running 
Php :: php time difference in hours 
Php :: implode with br in php 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =