Convert List to PHP Array
Form for List converting
This form allows you convert text list to PHP Array(each line will be converted to an array element), paste or upload your list below:
Result of List conversion to PHP Array
About List conversion to PHP Array
About this tool
The Convert List to PHP array was created for online converting text list into appropriate PHP type as Array. Each new line will be converted to a separate array element. This can come in handy for testing or debugging your List data, also for fast formatting and adding an array of PHP to your config or anywhere else.
Many programmers have cases when they need to add lists to the database or send emails to the list of emails or something else, so this tool is very useful because you can quickly convert the list to the PHP array.
How it Works?
Just paste your list to the textarea above and click to the button "Convert" and you will get PHP array in the next textarea.
Example of List conversion to PHP ArrayBefore:
first line second line last lineAfter:
[ 0 => 'first line', 1 => 'second line', 2 => 'last line', ]After the conversion, you can apply the PHP array to your project or use it for some other purpose.