php transform associative array to array
$array = array_values($array);
php transform associative array to array
$array = array_values($array);
how to create associative array in php
<?php
/*
there are three type of array
1 - Indexed array
*/
$a = array('a','b','c');
$b = ['a','b','c'];
/*
2 - Associative array
*/
$c = array(
'keyOne'=>'valueOne',
'keyTwo'=>'valueTwo'
);
$d = [
'keyOne'=>'valueOne',
'keyTwo'=>'valueTwo'
];
/*
3 - Multidimensional array
*/
$c = array(
'keyOne'=>array('a','b','c'),
'keyTwo'=>array('a'=>'1','b'=>'2')
);
$d = [
'keyOne'=>['a','b','c'],
'keyTwo'=>['a'=>'1','b'=>'2']
];
?>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us