Zum Inhalt springen
Magp.ie

Schlagwort: array

Parse Print_r output and convert into CSV

These days I seem to looking a lot a print_r output. For the uninitiated, print_r is a handy PHP function to allow you to print the contents of an array in a neat, readable format. Weiterlesen „Parse Print_r output and convert into CSV“ →

Eoin Code 1 Kommentar Februar 22, 2013Februar 22, 2013

Find duplicates in an array with PHP

Here is a function to find duplicate items in an array.

[source language=“php“]
/**
* Takes an array and returns an array of duplicate items
*/
function get_duplicates( $array ) {
return array_unique( array_diff_assoc( $array, array_unique( $array ) ) );
}
[/source]

Eoin Code 7 Kommentare Februar 2, 2011Februar 2, 2011

Convert CSV data into an associative array

If you want to convert comma separated values into an associated array, then use the following code.
Weiterlesen „Convert CSV data into an associative array“ →

Eoin Code 4 Kommentare Januar 28, 2011Januar 28, 2011

Tags

array associative array bash cheat sheet coda command commands cross-browser css CSV cURL debug debugging techniques developer debug tool duplicates encoding ExternalInterface filters Flash format github Gmail guide html javascript jQuery linux LSO Mac OSX MySQL online tools php plugin regex regular expression screen scripting search shortcuts SSH Sublime Text SVN tar terminal textwrangler tips UTF8 wordpress WordPress coding standards XML

Schließe dich 629 anderen Abonnenten an
Bereitgestellt von WordPress.com.
 

Kommentare werden geladen …