You can use this piece of code:
$array[] = ['Name' => 'aa', 'Surname' => 'bb'];
More Related Contents:
- Scrollable PHP Table [closed]
- PHP create new array by value
- Get first and second element of array [duplicate]
- Get operating system info
- PHP Associative Array Duplicate Keys
- Fatal error: Call to a member function fetch_assoc() on a non-object [duplicate]
- Round up to nearest multiple of five in PHP
- ByetHost server passing html values “Checking your browser” with JSON String
- PHP Change Array Keys
- Fetching single row, single column with PDO
- Single quotes or double quotes for variable concatenation? [closed]
- Calling C/C++ library function from PHP [closed]
- Multiple image upload with CodeIgniter
- Increase max_execution_time in PHP?
- Will enabling XDebug on a production server make PHP slower?
- How to check for null in Twig?
- “No such file or directory” or “No such host is known” when running migrations
- PHP preg_match (.*) not matching past line breaks [duplicate]
- Dynamic class method invocation in PHP
- How to call a closure that is a class variable?
- Replace string in text file using PHP
- How can I set a cookie and then redirect in PHP?
- Authorization header missing in PHP POST request
- How to create a subquery using Laravel Eloquent?
- Efficiency of using foreach loops to clear a PHP array’s values
- How to get cookie’s expire time
- Eloquent model mass update
- Xdebug for remote server not connecting
- Upload DOC or PDF using PHP
- How can I redirect a 404 Error in a custom 404 page using Codeigniter?