Re: [PHP] getting array slice of function output

2003-11-05 Thread Mike Migurski
>I have a line which strips the suffix (gif, GIF, TIFF, jpg, JPEG, etcetc >or I would just use basename() :-) from a string but it seems needlessly >drawn out: > > $file = preg_split('/\./',$dirfiles[0]) ; $file = $file[0] ; > >I would like to just assign the 0th element of the preg_split() output

[PHP] getting array slice of function output

2003-11-05 Thread David T-G
Hi, all -- I have a line which strips the suffix (gif, GIF, TIFF, jpg, JPEG, etcetc or I would just use basename() :-) from a string but it seems needlessly drawn out: $file = preg_split('/\./',$dirfiles[0]) ; $file = $file[0] ; I would like to just assign the 0th element of the preg_split() o