Bluehost.com Web Hosting $6.95

Re: [PHP] find string

This is a discussion on Re: [PHP] find string within the PHP General forums, part of the PHP Programming Forums category; Hello, This is a reply to an e-mail that you wrote on Mon, 11 Aug 2003 at 00:25, ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-11-2003
David Nicholson
 
Posts: n/a
Default Re: [PHP] find string

Hello,

This is a reply to an e-mail that you wrote on Mon, 11 Aug 2003 at
00:25, lines prefixed by '>' were originally written by you.

> Isn't there an in_array function you can use?
> If (in_array($action, array(a1,a2,a3,a4)) {
> // do something
> else {
> // do something else
> Carl.


Make sure that your string values are in quotes or PHP will belooking
for constants with those names, i.e. array('a1','a2','a3','a4')

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Free PHP error handling script: www.phpmachine.com/error-handler/

Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0