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,
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')
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 !
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
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 $
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))
_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
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
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
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:
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'
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
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
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'
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
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'
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
_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] );
//
  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("^(
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
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 !
> >
> >
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
> >
>
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
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
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
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
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
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
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
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
45 matches
Mail list logo