This is a discussion on "better way to write this?" within the PHP Forum section. This forum, and the thread "better way to write this? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
better way to write this?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hi,
Is there a way to write this without writing $key every time??? I tried $key == 'description' || 'includes'.... etc... but it dosen't work.
Thanks for your help! Jim. |
|
|
|
|||
|
Re: better way to write this?
You could put the values description, includes etc in an array then use this function http://www.php.net/manual/en/function.in-array.php
Adam |
|
||||
|
Re: better way to write this?
Beat me to it iZone...
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
||||
|
Re: better way to write this?
bah.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| better, write |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] do you write | quicker | Hosting & Domains | 8 | Dec 12th, 2007 05:13 |
| Do you write like a girl? | snow | Webforumz Cafe | 17 | Jan 4th, 2007 22:14 |
| How to write the query? | accessman | Databases | 0 | Oct 21st, 2005 16:16 |
| Using ASP to write UpToTheMinute...... | courtjester | Classic ASP | 4 | Aug 25th, 2004 14:54 |