[PHP] array help please

2003-01-05 Thread John Fishworld
can someone give me a bit of help / walthrough the following for me ! this first bits is okay $mysql query1 result array[cityid][cityname] mysql query2 result array[cityid][cityname] now what i want to do is kick out any doubles in my array and resort them alphebetically by cityname ?! help !

Re: [PHP] if question

2002-12-17 Thread John Fishworld
DUH ! Thanks all ! Obviously a slight case of brain death there ! > Hi John, > > > Can anyone tell me why this doesn't seem to work ?? > > It probably is working, but it's obviously not doing what you want :-) > > > if (($stelle_who != '1') OR ($stelle_who != '2') OR > > ($stelle_who != '3')

[PHP] if question

2002-12-17 Thread John Fishworld
Help ! Can anyone tell me why this doesn't seem to work ?? if (($stelle_who != '1') OR ($stelle_who != '2') OR ($stelle_who != '3') OR ($stelle_who != '5') ) { and what can i use as an alternative syntex ?? thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Fw: help please

2002-11-14 Thread John Fishworld
Hi, I've got some variable variables which i need to check that they are not the same ! There can be up to 9 of them ! for ($i = 1; $i <= $city_only_one; $i++) { $citydb = "stellen_city_".$i ; $new_city_db.$i = $$citydb; and what i need to do is check that $new_city_db1 does not equal $

[PHP] help variables !

2002-11-14 Thread John Fishworld
Hi, I've got some variable variables which i need to check that they are not the same ! There can be up to 9 of them ! for ($i = 1; $i <= $city_only_one; $i++) { $citydb = "stellen_city_".$i ; $new_city_db.$i = $$citydb; } Any help appreciated thanks -- PHP General Mailing List (http://www

[PHP] Passing an array on

2002-05-22 Thread John Fishworld
Whats the best way to pass on array on in a link ? eg offset is where we are (what page) but state is an array, with a variable size href=joblist.php?offset=$offset&state=$state thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Best way for date/time

2002-05-11 Thread John Fishworld
Okay so I've then got 2002-05-08 and whats then the best way to manipulate it regarding plus 3 days or plus 4 weeks ? > > lol ! no thats not what I meant ! > > what's best to put into MySQL > > datetime from MySQL > > now() > > or from php date ! > > > > Regarding the format - its a german si

Re: [PHP] Best way for date/time

2002-05-11 Thread John Fishworld
lol ! no thats not what I meant ! what's best to put into MySQL datetime from MySQL now() or from php date ! Regarding the format - its a german site so not expecting many yanks there ! :-)) > On Saturday 11 May 2002 19:42, John Fishworld wrote: > > Due to the large variety of

[PHP] Best way for date/time

2002-05-11 Thread John Fishworld
Due to the large variety of MySQL and PHP date time formats I'd like to have a couple of opinions from people out there ! Building a job database - and one of my fields is of course date time ! Which I want to be able to use latter in show all from last week, last month etc ! Also I want to show

Re: [PHP] Re: Forum with PHP, without using mySQL..

2002-05-06 Thread John Fishworld
Why bother posting a perl forum here ! YaBB is a leading FREE, downloadable Perl forum that allows you to provide a real-time chat and support system for your visitors. While chat programs allow people to talk directly, you have to be on them 24/7 to please everyone. With forum software like YaBB

[PHP] Confirm Remote File exists !

2002-05-06 Thread John Fishworld
I've got a form where people can enter a link into ! What's the best and quickest way of confirming if the link exists ! Just use fpassthru and see if you get an error ? Or has anyone got any better suggestions ?? Regards John -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] function sql question

2002-05-05 Thread John Fishworld
duh ! yeah that makes sense ! but it doesn't work ! I've no idea why but it refuses to give any information back ! I've managed to get round this by now no loger declaring it a function but just actually requiring it where i need it require ("get_city_1.inc"); print_r(array_values ($city)); I'v

[PHP] function sql question

2002-05-05 Thread John Fishworld
I've got a small function which checks city name with post codes And because this needs to be checked in several scripts I want to have it in my common functions file and include it ! require ("common_funtions.inc"); and then use it if (!check_city_from_plz($t_zipcode)){ echo "Your city does n

[PHP] Opinions Wanted

2002-05-02 Thread John Fishworld
Just a general question of the best way to do it ! I've got a job search site with mysql at the back of it ! You choose on the first page - type of job, where and other bits, go to the next page where query is done and then lists the jobs available! Whats the best way of keeping this page tempora

Re: [PHP] PHP Editors

2002-05-01 Thread John Fishworld
I've used Edit Plus and Dreamweaver as a combination for a while ! And the new Dreamweaver is worth getting ! I've set it up in 10 minutes with my Linux box using there PHP and MySQL and first impressions are very good ! Much better than Ultradev was and a hell of lot quicker and more stable than

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
aha ! thats very strange then because mine works at the moment but if I add the /i at the end then it doesn't ! > On Wed, 1 May 2002, John Fishworld wrote: > > Thanks after playing about with that I've got the following which does seem > > to work ! > > > >

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
Thanks after playing about with that I've got the following which does seem to work ! $imode_code[$i] = eregi_replace("(src=)(\")([a-z0-9_\/-]+\.gif)(\")", "\\1\\2$path/\\3\\2", $imode_code[$i]); Very very very slowly getting the hang of regexs ! What does your /i do at the end ??? Thanks > T

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
  http://www.baesurl.com/imenu/";>i-menu > On Tuesday 30 April 2002 19:43, John Fishworld wrote: > > > $imode_code = file("$url_file"); > > $file_name = basename($url_file); > > $path = dirname($url_file); > > $stripped_path = eregi_replace("^(

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
_1\\0",$imode_code[$i]); // $imode_code[$i] = eregi_replace("([^\"]+[a-z_]+[\.php]+[\"$])", "$next_path_1\\0",$imode_code[$i]); // replace imode pictos with a real gif $imode_code[$i] = ereg_replace("&#([0-9]{5});" , "" , $imode_code[$i] ); //

Re: [PHP] regular expressions help please

2002-04-30 Thread John Fishworld
still show even ! I've already got from the original file the original location http://www.whatever.com and now want to insert that in front of the gif files ie $imode_code[$i] = eregi_replace("( On Tuesday 30 April 2002 16:31, John Fishworld wrote: > > I'm trying to find files i

[PHP] regular expressions help please

2002-04-30 Thread John Fishworld
I'm trying to find files in my array for example ="lg_imode.gif" and ="/db/imodeklein/edgar-IMODE-1-.gif" I want to differentiate between the files with slash at the front and ones without so that I can add a server path ! but as usual I' m having problems with the correct regex At the moment I'

Re: [PHP] create textfile if not existing?

2002-04-29 Thread John Fishworld
This works but the "w" means that it writes over whats already in the file (look at the manual about fopen for more details) $new_file = "txt/whatever.txt"; $fh = fopen($new_file , "w"); // write the changed new file fputs ($fh, $new_code); // now close the file fclose($fh); Regards John > le

[PHP] More reg-ex probs

2002-04-29 Thread John Fishworld
I'm trying to find files in my array for example ="lg_imode.gif" and ="/db/imodeklein/edgar-IMODE-1-.gif" I want to differentiate between the files with slash at the front and ones without so that I can add a server path ! but as usual I' m having problems with the correct regex At the moment I'

Re: [PHP] Re: reg-ex again

2002-04-29 Thread John Fishworld
r path and written to the file ! > On Monday 29 April 2002 17:10, John Fishworld wrote: > > No the problem is I'm reading a file into an array and then need > > to change any of the links in the file from relative links to absolute > > links ! > > So that my

Re: [PHP] Re: reg-ex again

2002-04-29 Thread John Fishworld
No the problem is I'm reading a file into an array and then need to change any of the links in the file from relative links to absolute links ! So that my lg_mode.gif gets the full server path in front of it http://www.ltest.com/lg_mode.gif and exactly the same with the other one but of course I

[PHP] reg-ex again

2002-04-29 Thread John Fishworld
I'm trying to find files in my array for example ="lg_imode.gif" and ="/db/imodeklein/edgar-IMODE-1-.gif" I want to differentiate between the files with slash at the front and ones without so that I can add a server path ! but as usual I' m having problems with the correct regex At the moment I'

Re: [PHP] reg-ex please

2002-04-27 Thread John Fishworld
endet: Samstag, 27. April 2002 1:26 PM > An: [EMAIL PROTECTED] > Betreff: AW: [PHP] reg-ex please > > Try it like this : > $code[$i] = ereg_replace("&#([0-9] {5});" , "\\1.bing" , > $code[$i] ); > > -Ursprüngliche Nachricht- > Von:

[PHP] reg-ex please

2002-04-27 Thread John Fishworld
Help please from one of the reg-ex experts out there please ! I'm trying to find the pattern &#(5 number); example 𑃸 This works $code[$i] = ereg_replace("&#([0-9])+" , "replace\\0.bing" , $code[$i] ); and I get back replace 𑃸.bing but I also want to lose the &# and the ; so I get back 69880.bi

Re: [PHP] syntax

2002-03-27 Thread John Fishworld
Sorry I think I've badly explained this ! I'm getting results from mysql in a while loop but I need the results outside of the loops and so what I want to do is take the first variable from the db and rename it as variable 1 and then before the end of the while loop have a $i++; so i want $newva

[PHP] syntax

2002-03-27 Thread John Fishworld
Can someone please remind me what the correct syntax for this is ! in a loop and want individual $ned_1_city = blah $ned_2_city = blur I've been trying this but its wrong $ned_.$i._city = $ned_city ; thanks john -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Array in a Loop Question

2002-03-26 Thread John Fishworld
Brilliant thanks ! I've got three of these in my form ! lol > I think to get the results you are wanting, you might try this. > > > the address[] tells the form that this element is an array and when > submitted, will be converted into an indexed array on the process page. > > so you take this

Re: [PHP] Personal web server that runs PHP

2002-03-26 Thread John Fishworld
Also good http://www.omnicron.ca but not free ! > In fact, using Apache Win32 Module on a Windows 98 PC > is a much better choice & option rather then PWS. > Apache server gives greater flexibility & support. > > I don't see any reason why you should choose PWS over > Apache Win32 for your Win 9

[PHP] Array Question

2002-03-26 Thread John Fishworld
I have some multiple select boxes in a form ie all Regions Region19 Region14 Region15 these then get passed and I want to use them in mysql query blah blah WHERE (t_state_id_state = $state[0]) Whats the best way of finding out how many items are

Re: [PHP] Auto password generation

2002-03-26 Thread John Fishworld
something like this function randString($length=16){ mt_srand((double)microtime()*100); $newstring=""; if($length>0){ while(strlen($newstring)<$length){ switch(mt_rand(1,3)){ case 1: $newstring.=chr(mt_rand(48,57)); break; // 0-9 case 2: $newstring.=chr(mt_rand(65,90)); brea

[PHP] Another Session Question

2002-03-25 Thread John Fishworld
I've seen various tutorials on sessions where they specify the session id instead of just using one generated by php ! Why ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] reg-ex

2002-03-25 Thread John Fishworld
How can I change this to accept spaces as well ? (ereg("^[A-Za-zÀ-ÖØ-öø-ÿ]*$", $str)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Still REG EX

2002-03-23 Thread John Fishworld
Okay good point but still why doesn't it work ? thanks john > On Sun, 24 Mar 2002, John Fishworld wrote: > > I'm still playing about trying to validate an url > > www(dot)something(dot)something ! > > > > I thought this would work but know > > >

[PHP] Still REG EX

2002-03-23 Thread John Fishworld
I'm still playing about trying to validate an url www(dot)something(dot)something ! I thought this would work but know if (ereg("^(w{3})(\\.)([a-zA-Z]+)(\\.)([a-z]{2,4})$", $str)) can anyone explain why not ??? ^(w{3}) = three w at start of string ?? (\\.) = literal dot ?? ([a-zA-Z]+) match

[PHP] Form Validation Reg EX

2002-03-23 Thread John Fishworld
Hi I'm just trying to validate an url ! Without tracing or confiming it I just want www.whatever.max 4 letters This is what I had but its wrong ! :-)) function check_url($str) { if (ereg("w{3}.^[a-z0-9-]+(\.[a-z0-9-]+)*$", $str)) { return 1; } else { return 0; } } I just know that some RegEx

Re: [PHP] FAQ

2002-03-22 Thread John Fishworld
Yep good idea ! Oh and by the books - a couple of opinions wouldn't be bad either ! regards john > I've been working on that at http://www.php-faq.com/ Want to help? > > > -Original Message- > > From: James Taylor [mailto:[EMAIL PROTECTED]] > > Sent: Friday, March 22, 2002 2:30 PM > > To

[PHP] - not meant to scare people !

2002-02-28 Thread John Fishworld
Maybe of interest ! http://security.e-matters.de/advisories/012002.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Miliseconds with PHP4

2002-02-22 Thread John Fishworld
how out of interest ? > Hello there, > > I want to know the execution time of some scripts I made, I'm using the > difference of seconds (time() function) between the start and the end of > the script. > > But, I would like to get a greater precision... so, I was wondering if > there is a cha

Re: [PHP] PHP Work in New York

2002-02-12 Thread John Fishworld
Well as an englishman in Germany - php is pretty damm big here ! A lot more than in the UK ! So maybe he should have stayed in Germany ! lol Although the market has collapsed a bit at the moment ! > I guess I'm lucky living in Australia then - there's quite a few places > using ASP but there's a

Re: [PHP] table row

2002-01-31 Thread John Fishworld
_city_name"]; > echo " > href=\"city_person.php?city_id=$cityid\">$cityname > "; > if ($cntr % 2 == 0) echo ""; > } // from while result 0 > echo""; > > > -Original Message- > From: John Fishworld [mailto:[EM

[PHP] table row

2002-01-31 Thread John Fishworld
apologies for a stupid question ! but it's late ! everthings fine, mysql query, results etc but I want to produce a table with two columns instead of just one long column ie answer1answer2 can someone please give me a hint how to do it ? while ($r = mysql_fetch_array($result0))