Working with different arrays created on Windows or Linux
I am have a problem formating some data from an array. I am getting two different outputs and think the difference is due to Windows or Linux.
The full code I am using is displayed at the bottom of this page:
http://www.rubblewebs.co.uk/imagemag...rver/fonts.php
Selected parts of the output from the arrays are:
http://www.rubblewebs.co.uk/TESTS/server.png
http://www.rubblewebs.co.uk/TESTS/local.png
Currently I am using a function I found on the net and deleting out what I do not need:
PHP Code:
// Function to remove items from array
function array_delete( $array, $filterfor ){
$thisarray = array ();
foreach( $array as $value )
if( stristr( $value, $filterfor ) === false && strlen( $value ) > 0 )
$thisarray[] = $value;
return $thisarray;
}
// Remove blank lines
$NoBlanks = array_filter( $IMarray );
// Remove items containing Name from the arrary
$NoName = array_delete( $NoBlanks, "Name" );
// Remove items containing Path: from the array
$NoPath = array_delete( $NoName, "Path:" );
ETC.
I need to remove the blank lines, lines with --------, lines with Name, lines with Path etc. In fact all I need is the font name :rolleyes:
There must be a better way to do this please could somebody give me a hand.