Re: [PHP] Using split to establish extension of file

2004-07-07 Thread Russell Curtis
Many thanks - just what I was looking for! Cheers Russell -- --- Russell Curtis M +44 (0) 7796268780 www.russellcurtis.com www.buildingdetails.co.uk "Ewout" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > - Original

[PHP] Using split to establish extension of file

2004-07-07 Thread Russell Curtis
I'm trying to use the split function to identify the extension of an uploaded file: $file_name = $_FILES['userfile']['name']; $pieces = explode(".", $file_name); $file_extension = $pieces[1]; // piece2 Which will work, providing that the uploaded file only has one full-stop in the name (

[PHP] Re: Limit number of characters in a string

2004-06-11 Thread Russell Curtis
Wow, that was fast - many thanks. Cheers Russell -- --- Russell Curtis M +44 (0) 7796268780 www.russellcurtis.com www.buildingdetails.co.uk "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Russell Curtis&qu

[PHP] Limit number of characters in a string

2004-06-11 Thread Russell Curtis
Hi Anyone know how to clip the number of characters in a string? For instance, I have a string carrying a long piece of text, say, of 200 characters, but I want to reduce this to just the first 100 characters. Thanks in advance. Russell -- --- Russell Curtis

[PHP] Limit the number of characters in a string

2004-06-11 Thread Russell Curtis
Hi Anyone know how to clip the number of characters in a string? For instance, I have a string carrying a long piece of text, say, of 200 characters, but I want to reduce this to just the first 100 characters. Thanks in advance. Russell -- --- Russell Curtis