What is PHP Array?

A PHP array literal: an outer array of rows, each an associative array keyed by column name.

Who uses it

PHP applications that need a lookup table in code rather than in a database.

Writing PHP Array

Values are single-quoted with backslashes and quotes escaped, so the output can be pasted into a file as is.

What it can hold

PHP is source code. An array of associative arrays; PHP keeps insertion order, so column order survives. A machine can read the table back out of it without guessing, which is what makes it safe to convert into and out of.

It keeps

It cannot express

What it looks like

Example PHP Array
$staff = [
  ['id' => '007', 'name' => 'Halima Yusuf', 'role' => 'Analyst, data', 'started' => '2024-03-15', 'hours' => '38.5'],
  ['id' => '012', 'name' => 'Jonah "Jo" Pryce', 'role' => 'Engineer', 'started' => '2025-11-02', 'hours' => ''],
  ['id' => '104', 'name' => 'Wei Chen', 'role' => 'Manager', 'started' => '2023-06-30', 'hours' => '40'],
];

Questions

How do I open PHP Array files?

PHP Array is written by Tablizer rather than read by it. Open the file in whichever tool the format belongs to.

Is PHP Array a good format for sharing data?

It depends who is receiving it. PHP applications that need a lookup table in code rather than in a database. If the recipient is outside that group, a plain CSV travels further than anything else.

Convert something else to PHP Array