Re: [PHP] substr?

2008-06-20 Thread Jason Pruim
One of theses days I will ;) But when you know a tool that will work and it's a simple little form that's only going to be used by a few people occasionally until this business takes off and I need to upgrade stuff... explode() works just fine :P On Jun 19, 2008, at 6:18 PM, Philip

Re: [PHP] substr?

2008-06-20 Thread Daniel Brown
Don't top post! :-o On Fri, Jun 20, 2008 at 7:44 AM, Jason Pruim [EMAIL PROTECTED] wrote: One of theses days I will ;) There's only one 's' in 'these'. But when you know a tool that will work and it's a simple little form that's only going to be used by a few people occasionally

Re: [PHP] substr?

2008-06-20 Thread tedd
At 2:21 PM -0400 6/20/08, Daniel Brown wrote: On Fri, Jun 20, 2008 at 7:44 AM, Jason Pruim [EMAIL PROTECTED] wrote: One of theses days I will ;) There's only one 's' in 'these'. Grammar police alert! Always do a better job than you need to do. I agree with that -- however -- if

Re: [PHP] substr?

2008-06-20 Thread Jason Pruim
I'l post where ever I want in my own thread Master Brown :P Maybe just to confuse people even more, I should rot_13 this e-mail :P On Jun 20, 2008, at 2:21 PM, Daniel Brown wrote: Don't top post! :-o On Fri, Jun 20, 2008 at 7:44 AM, Jason Pruim [EMAIL PROTECTED] wrote: One of theses

Re: [PHP] substr?

2008-06-19 Thread Peter Ford
Jim Lucas wrote: Peter Ford wrote: Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip

Re: [PHP] substr?

2008-06-19 Thread Philip Thompson
On Jun 17, 2008, at 8:01 AM, Dan Shirah wrote: The code I'm having issues with is this: $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension). $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension

Re: [PHP] substr?

2008-06-19 Thread Daniel Brown
Try this: ?php $filename = 'this_example.php.file.backup.phps'; echo substr($filename,(strrpos($filename,'.') + 1),strlen($filename)).\n; ? -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and

Re: [PHP] substr?

2008-06-19 Thread Philip Thompson
Does that get a different result than mine? ~Phil On Jun 19, 2008, at 10:44 AM, Daniel Brown wrote: Try this: ?php $filename = 'this_example.php.file.backup.phps'; echo substr($filename,(strrpos($filename,'.') + 1),strlen($filename)).\n; ? -- PHP General Mailing List

Re: [PHP] substr?

2008-06-19 Thread Jason Pruim
Know what I found that works most reliably though? $filenameExploded = explode(., $filename); that way, if I have a file like this: filename.todaysdate.todaystime.extension I don't end up with the extension being: .todaysdate.todaystime.extension :) Unless I was using the substr() command

Re: [PHP] substr?

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 1:53 PM, Philip Thompson [EMAIL PROTECTED] wrote: Does that get a different result than mine? Sorry, Phil, I hadn't even been paying much attention to the thread, and saw that it just kept going, so I sent in a suggestion. Both of our things do the exact same thing,

Re: [PHP] substr?

2008-06-19 Thread Philip Thompson
RTFM: http://www.php.net/strrpos Hehe =D Find position of last occurrence of a char in a string This avoids the extension containing multiple '.'s. ~Phil On Jun 19, 2008, at 1:02 PM, Jason Pruim wrote: Know what I found that works most reliably though? $filenameExploded = explode(.,

Re: [PHP] substr?

2008-06-18 Thread Frank Arensmeier
17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know that is large, but

Re: [PHP] substr?

2008-06-18 Thread Peter Ford
Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know

Re: [PHP] substr?

2008-06-18 Thread Jim Lucas
Peter Ford wrote: Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of

[PHP] substr?

2008-06-17 Thread Jason Pruim
Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know that is large, but it's for a print shop and they get HUGE files to print from.

Re: [PHP] substr?

2008-06-17 Thread Stut
On 17 Jun 2008, at 13:39, Jason Pruim wrote: I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know that is large, but it's for a print shop and

Re: [PHP] substr?

2008-06-17 Thread Dan Shirah
The code I'm having issues with is this: $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension). $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from the filename. All I want to do is grab

Re: [PHP] substr?

2008-06-17 Thread Jason Pruim
On Jun 17, 2008, at 9:01 AM, Dan Shirah wrote: The code I'm having issues with is this: $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension). $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension

Re: [PHP] substr?

2008-06-17 Thread Jason Pruim
On Jun 17, 2008, at 8:46 AM, Stut wrote: On 17 Jun 2008, at 13:39, Jason Pruim wrote: I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know that

Re: [PHP] substr?

2008-06-17 Thread Dan Shirah
Jason, If you don't expressly need it to run server side, you could always use a simple little javascript check if you want. *script type=text/javascript function checkFileType() { // for mac/linux, else assume windows if (navigator.appVersion.indexOf('Mac') != -1 ||

Re: [PHP] substr?

2008-06-17 Thread Stut
On 17 Jun 2008, at 14:05, Jason Pruim wrote: On Jun 17, 2008, at 8:46 AM, Stut wrote: On 17 Jun 2008, at 13:39, Jason Pruim wrote: I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip

Re: [PHP] substr?

2008-06-17 Thread Stut
On 17 Jun 2008, at 14:04, Jason Pruim wrote: On Jun 17, 2008, at 9:01 AM, Dan Shirah wrote: The code I'm having issues with is this: $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension). $ext = substr($filename, strpos($filename,'.'),

Re: [PHP] substr?

2008-06-17 Thread tedd
At 9:01 AM -0400 6/17/08, Dan Shirah wrote: The code I'm having issues with is this: $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension). $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension

Re: [PHP] substr?

2008-06-17 Thread Daniel Brown
On Tue, Jun 17, 2008 at 8:39 AM, Jason Pruim [EMAIL PROTECTED] wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know that is

Re: [PHP] substr?

2008-06-17 Thread Jim Lucas
Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip files in excess of 200 MB... Yes I know that is large, but it's for a print shop and they get HUGE

[PHP] substr and UTF-8

2006-08-30 Thread Peter Lauri
Hi group, I want to limit the number of characters that are shown in a script. The characters happen to be Thai, and the page is encoded in UTF-8. Everything works, except when I want to cut the text (just take start of string). I do: echo substr($thaistring, 0, 30); The beginning of the

Re: [PHP] substr and UTF-8

2006-08-30 Thread Jochem Maas
Peter Lauri wrote: Hi group, I want to limit the number of characters that are shown in a script. The characters happen to be Thai, and the page is encoded in UTF-8. Everything works, except when I want to cut the text (just take start of string). I do: echo substr($thaistring, 0, 30);

Re: [PHP] substr and UTF-8

2006-08-30 Thread Michael B Allen
On Wed, 30 Aug 2006 18:34:20 +0700 Peter Lauri [EMAIL PROTECTED] wrote: Hi group, I want to limit the number of characters that are shown in a script. The characters happen to be Thai, and the page is encoded in UTF-8. Everything works, except when I want to cut the text (just take start of

Re: [PHP] substr and UTF-8

2006-08-30 Thread Michael B Allen
On Wed, 30 Aug 2006 10:08:36 -0400 Michael B Allen [EMAIL PROTECTED] wrote: On Wed, 30 Aug 2006 18:34:20 +0700 Peter Lauri [EMAIL PROTECTED] wrote: Hi group, I want to limit the number of characters that are shown in a script. The characters happen to be Thai, and the page is encoded

RE: [PHP] substr and UTF-8

2006-08-30 Thread Peter Lauri
[snip] Actually this is false. I don't know what I was thinking. The high bit will be set in all bytes of a UTF-8 byte sequence. If it's not it's an ASCII character. The bytes are actually layed out as follows [1]: U- ___ U-007F: 0xxx U-0080 ___ U-07FF: 110x

Re: [PHP] substr and UTF-8

2006-08-30 Thread Michael B Allen
On Wed, 30 Aug 2006 21:46:18 +0700 Peter Lauri [EMAIL PROTECTED] wrote: function is_utf8_start($b) { return (($b 0x80) == 0) || ($b 0x40); } [/snip] :) I think I will go with the mb_substr function, it works for me :) Yeah, I guess that's the right thing to do. Otherwise, in a

[PHP] Substr by words

2005-10-29 Thread Danny
Hi, I need to extract 50 words more or less from a description field. How can i do that?. Substr, cuts the words. Is there any other way to that, without using and array? I mean and implemented function in PHP 4.x I´ve been googling around, but wordwrap, and substr is driving me mad... Thanks

Re: [PHP] Substr by words

2005-10-29 Thread Richard Lynch
On Sat, October 29, 2005 6:36 am, Danny wrote: I need to extract 50 words more or less from a description field. How can i do that?. Substr, cuts the words. Is there any other way to that, without using and array? I mean and implemented function in PHP 4.x I´ve been googling around, but

[PHP] Substr

2004-10-25 Thread Shaun
Hi, I have a string as follows: pid_1_date_2004_10_25 pid tells me the Project_ID and date tells me the date(!). I need to extract this information from the string so to get the date I need everything after 'date_' as follows: substr(strstr($key, 'date_'), 4) However, to get the Project ID I

Re: [PHP] Substr

2004-10-25 Thread raditha dissanayake
Shaun wrote: However, to get the Project ID I need to extract everything after 'pid_' and everything before 'date_'. Can someone help me with this please as PHP doesn't seem to provide a function for extracting information from a string that occurs before the 'needle'? yes it doe. look under

Re: [PHP] Substr

2004-10-25 Thread Francisco M. Marzoa Alonso
Use regular expresions: ?php $string = pid_1_date_2004_10_25; preg_match ( '/^pid_(.*?)_date_(.*?)$/', $string, $regs ); print_r ($regs); ? Shaun wrote: Hi, I have a string as follows: pid_1_date_2004_10_25 pid tells me the Project_ID and date tells me the date(!). I need to extract this

Re: [PHP] Substr

2004-10-25 Thread Francisco M. Marzoa Alonso
You can also use split function if you do not know about regular expressions and do not want to learn: ?php $string = pid_1_date_2004_10_25; $regs = split (_, $string ); print_r ($regs); ? I think its autoexplicative. Shaun wrote: Hi, I have a string as follows: pid_1_date_2004_10_25 pid tells

RE: [PHP] Substr

2004-10-25 Thread Graham Cossey
What about using explode()? $array = explode('_', 'pid_1_date_2004_10_25'); $pid = $array[1]; $yr = $array[3]; $mn = $array[4]; $dy = $array[5]; Graham -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: 25 October 2004 14:00 To: [EMAIL PROTECTED] Subject: [PHP] Substr

Re: [PHP] Substr

2004-10-25 Thread M. Sokolewicz
split() uses the POSIX regular expressions engine, and thus also uses regular expressions. The loading of this engine is a massive overhead when dealing with simple splitting of a string. To do basic things like this it's a lot faster to use explode(). - Tul Francisco M. Marzoa Alonso wrote:

[PHP] substr == SOLVED (was Re: [PHP] substrings)

2004-04-25 Thread David T-G
Richard, et al -- ...and then Richard Harb said... % % $color = '#aabbcc'; % % if (strlen($color) == 7) { %echo ' r: ' . substr($color, 1, 2); [snip] D'oh! I knew it should be substr but I could never find it! I was up to page 1098 or such and muddling through all of the PCRE doc when I

Re: [PHP] substr ?

2003-08-17 Thread John Taylor-Johnston
Sorry, scrap that: if (substr_count($mystring,¶) 0) John Taylor-Johnston wrote: How can I find out if $mystring includes the character ¶? Thought substr would do it? J -- John Taylor-Johnston - If it's not

Re: [PHP] substr ?

2003-08-17 Thread John W. Holmes
John Taylor-Johnston wrote: Sorry, scrap that: if (substr_count($mystring,) 0) John Taylor-Johnston wrote: How can I find out if $mystring includes the character ? Thought substr would do it? J strpos() would be better... -- ---John Holmes... Amazon Wishlist:

[PHP] substr ?

2003-08-16 Thread John Taylor-Johnston
How can I find out if $mystring includes the character ¶? Thought substr would do it? J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] substr() on part an ereg() capture

2003-03-26 Thread Marek Kilimajer
Forgot to mention this is to be run after eregi_replace(([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=]), a href=\\\1://\\2\\3\ {$t}\\\1://\\2\\3/a, $str); as it only replaces long strings within a tags Marek Kilimajer wrote: $str = preg_replace('|(a[^]*[^]{55})[^]+(/a)|','$1...$2', $str);

Re: [PHP] substr() on part an ereg() capture

2003-03-26 Thread Justin French
A that makes more sense!! Am trying everyone's suggestions now... Justin French on 27/03/03 3:32 AM, Marek Kilimajer ([EMAIL PROTECTED]) wrote: Forgot to mention this is to be run after eregi_replace(([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=]), a href=\\\1://\\2\\3\

[PHP] substr() on part an ereg() capture

2003-03-25 Thread Justin French
Hi, I have this ereg to turn URLs into links: eregi_replace(([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=]), a href=\\\1://\\2\\3\ {$t}\\\1://\\2\\3/a, $str); ... found it in the manual i think, or maybe on weberdev.com examples Anyhoo, it places the whole link in between the a... and /a,

Re: [PHP] substr() on part an ereg() capture

2003-03-25 Thread skate
couldn't you just do substr( $blah, 0, 55) or something similar? (i'm crap with syntax, so that's just off my head...) -skate- fatcuban.com - Original Message - From: Justin French [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 1:24 PM Subject: [PHP] substr

RE: [PHP] substr() on part an ereg() capture

2003-03-25 Thread Boaz Yahav
To: php Subject: [PHP] substr() on part an ereg() capture Hi, I have this ereg to turn URLs into links: eregi_replace(([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=]), a href=\\\1://\\2\\3\ {$t}\\\1://\\2\\3/a, $str); ... found it in the manual i think, or maybe on weberdev.com examples Anyhoo

Re: [PHP] substr() on part an ereg() capture

2003-03-25 Thread Marek Kilimajer
$str = preg_replace('|(a[^]*[^]{55})[^]+(/a)|','$1...$2', $str); Justin French wrote: Hi, I have this ereg to turn URLs into links: eregi_replace(([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=]), a href=\\\1://\\2\\3\ {$t}\\\1://\\2\\3/a, $str); ... found it in the manual i think, or maybe on

[PHP] substr() help

2003-02-07 Thread Paul Reilly
working on a peice of code that should be pretty easy, but for some reason I am not getting any results. I want the first 10 characters of each line from the file I am reading and am using this code: $temp = str_replace(\n, , fgets($fp, 4096)); $line = substr ($temp, 0,

RE: [PHP] substr() help

2003-02-07 Thread Van Andel, Robbert
Try this $temp = fgets($fp,4096); $line = substr($temp,0,10); Robbert van Andel -Original Message- From: Paul Reilly [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 9:06 AM To: [EMAIL PROTECTED] Subject: [PHP] substr() help working on a peice of code that should

RE: [PHP] substr?

2002-06-18 Thread Ford, Mike [LSS]
-Original Message- From: Lazor, Ed [mailto:[EMAIL PROTECTED]] Sent: 17 June 2002 21:24 To: 'Chris Knipe'; [EMAIL PROTECTED] Subject: RE: [PHP] substr? Here's another way of writing that code that may be easier to work with: $TestValues = array(072, 073, 082, 083, 084

RE: [PHP] substr?

2002-06-18 Thread Ford, Mike [LSS]
-Original Message- From: Chris Knipe [mailto:[EMAIL PROTECTED]] Sent: 17 June 2002 09:28 Is this right? It seems to me that substr is working in reverse? $string = 1234567890; // Always numerical, always 10 chars. if (!substr($string, 0, -7) == 083) { echo not 083\n; } else

Re: [PHP] substr?

2002-06-18 Thread Chris Knipe
When working with Boolean expressions in this way, deMorgan's laws often come in handy; these state that: !a AND !bis the same as !(a OR b) !a OR !b is the same as !(a AND b) Hope this helps!! I don't know who this deMorgan dude is, but that rule is being written

[PHP] substr....what does this mean? (newbie)

2002-05-21 Thread r
Hi ppl, Can you tell me what does this mean? if (substr($text, -1) == .) {$test = substr($text, 0, -1);} I know the if part searches the $text from the starting for the . I am just confused about what the second and third arguement does in the substr. (Second line) I know that this is an easy

RE: [PHP] substr....what does this mean? (newbie)

2002-05-21 Thread Scott Hurring
friend. --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 -Original Message- From: r [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 2:51 AM To: [EMAIL PROTECTED] Subject: [PHP] substrwhat does this mean? (newbie

[PHP] Substr and HTML tags - Problem...

2002-02-25 Thread Sascha Ragtschaa
Hi, I got a small problem: I need to limit a teaser-text via substr($teaser,0,100). The Problem I now have is, if the last 4 string chars are a html tag like br and this tag will be cut by the substr to something like that: br - it will mess up the webpage... How can I avoid that the html tags

Re: [PHP] Substr and HTML tags - Problem...

2002-02-25 Thread Simon Willison
Sascha Ragtschaa wrote I need to limit a teaser-text via substr($teaser,0,100). The Problem I now have is, if the last 4 string chars are a html tag like br and this tag will be cut by the substr to something like that: br - it will mess up the webpage... How can I avoid that the html tags are

AW: [PHP] Substr and HTML tags - Problem...

2002-02-25 Thread Sascha Ragtschaa
Thanks, found a way - the PHP function wordwrap does it just perfect (recognizes the tags, too) ... Sometimes it's just good to browse a little bit through PHP.net (*g*) Sascha Ragtschaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Substr and HTML tags - Problem...

2002-02-25 Thread Jon Haworth
Personally when I'm doing teasers I strip all HTML from the content before using substr: $teaser = strip_tags($content); $teaser = substr($teaser, 0, 100); $teaser .= '...'; // Nice touch to have a '...' on the end :) You don't have a handy way to check that your substr() doesn't

[PHP] Substr + Text + HTML - Problem

2002-02-25 Thread Sascha Ragtschaa
Hi, I still have one problem, which seems to be not solveable in a easy and smooth way: I have a text file like this: $text=This is a html extended textbrwhich needs to be cut after 100 charsbr; Than I do a substring to limit it to only 100 words (teaser-format): $teaser_1=substr($text, 0,

[PHP] substr trim functions..

2001-12-14 Thread Andras Kende
I trying to convert some full names to last names only like: -get the subtext from the end until the space joe blue - blue bill western - western Looked around at php.net docs but im not sure... Thanks Andras -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

Re: [PHP] substr trim functions..

2001-12-14 Thread Nicolas Costes
$pos=strpso($line, ); $last=substr($line, $pos, strlen($line)); http://www.php.net/manual/en/function.substr.php http://www.php.net/manual/en/function.strpos.php http://www.php.net/manual/en/function.strlen.php @+++ Le Vendredi 14 Décembre 2001 17:11, Andras Kende a écrit : I trying to

Re: [PHP] substr trim functions..

2001-12-14 Thread jimtronic
There are no shortage of ways to do this. // Using explode() ... echo array_pop(explode( ,$full_name)); // Using split() ... echo array_pop(split( ,$full_name)); // Using stristr() while($haystack = stristr($haystack, )) { $haystack = substr($haystack,1); $last_word =

[PHP] substr() in MySQL SELECT?

2001-09-19 Thread Tom Churm
hi, could someone please tell me why this doesn't work? i thought that string functions could be used in select statements? i dunno... SELECT User, SendDate FROM my_form WHERE substr(SendDate, 0, 2)=19; and i've tried the damn thing with brackets around all different parts. thanks much,

RE: [PHP] substr() in MySQL SELECT?

2001-09-19 Thread Don Read
around all different parts. Try to figure out the damn difference between PHP substr() SQL SUBSTRING(). thanks much, your welcome, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's

Re: [PHP] substr() in MySQL SELECT?

2001-09-19 Thread Tom Churm
... SELECT User, SendDate FROM my_form WHERE substr(SendDate, 0, 2)=19; and i've tried the damn thing with brackets around all different parts. Try to figure out the damn difference between PHP substr() SQL SUBSTRING(). thanks much, your welcome, -- Don Read

Re: [PHP] substr question...

2001-07-27 Thread Ryan Fischer
You wrote: I am trying to receive file names but can't quite figure out the proper substr to do it: jeff.dat jeffrey.dat chris.dat tom.dat I want to receive the name to the left of the .dat Jeff $file = array(jeff.dat, jeffrey.dat, chris.dat, tom.dat); for($i=0; $icount($file); $i++){

[PHP] substr question...

2001-07-26 Thread Jeff Lewis
I am trying to receive file names but can't quite figure out the proper substr to do it: jeff.dat jeffrey.dat chris.dat tom.dat I want to receive the name to the left of the .dat Jeff

Re: [PHP] substr question...

2001-07-26 Thread Unni
try $filename=explode(., names); echo $filename[0] Jeff Lewis wrote: I am trying to receive file names but can't quite figure out the proper substr to do it: jeff.dat jeffrey.dat chris.dat tom.dat I want to receive the name to the left of the .dat Jeff -- PHP General Mailing

RE: [PHP] substr question...

2001-07-26 Thread Boget, Chris
I am trying to receive file names but can't quite figure out the proper substr to do it: jeff.dat jeffrey.dat chris.dat tom.dat I want to receive the name to the left of the .dat $fileName = eregi_replace( \.dat, , $fullFileName ); Chris

Re: [PHP] substr question...

2001-07-26 Thread Jeff Lewis
RE: [PHP] substr question...I suppose that $tmpmember=substr($entry, 0,-4); will do the same? :) Jeff - Original Message - From: Boget, Chris To: 'Jeff Lewis' ; [EMAIL PROTECTED] Sent: Thursday, July 26, 2001 3:54 PM Subject: RE: [PHP] substr question... I am trying