Re: [PHP] stristr query trouble
Ron Piggott wrote: $subjects = Delivery Status Notification(Failure); Here is my syntax: if ( stristr( $subjects, Delivery Status Notifcation(Failure) ) ) { Notification is misspelled. Next time copy and paste the comparison string or use regular expressions to be more safe. Kind regards Warren -- Developer The University of the Witwatersrand Email: warren.windvo...@wits.ac.za Gmail: wwindvo...@gmail.com MSN: wwindvo...@hotmail.com Skype: wwindvogel Tel: +27 11 717 7184 Cell: +27 73 264 6700 Fax2Email: 0862950483 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reg Ex
Eric Butera wrote: Who says every file will have an extension? Who says they're all .+3 chars? When I first started php I tried that and it failed in a lot of places. I've also run into that problem in the past. The way that I could work around all these issues was to document naming conventions for the files and validate these before using the regex to obtain the necessary information. Regards Warren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reg Ex
Eric Butera wrote: ...or you could just use pathinfo and be done with it. I work for clients. Clients shouldn't have to read a faq to upload a file. I agree. I assumed that pathinfo simply returned the relative or absolute path of the file. After further inspection I have to stand corrected and agree that using pathinfo is the best approach. I should have probably done some more research when putting together my solution. Asking the list would've been an even better option ;-) . Thats why there's no substitute for experience or better line of work because you learn something everyday. Thanks gentleman. Time for some refactoring. :-D Regards Warren // -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php