ement="comes after";
}
else if ($result<=-1)
{
$statement="comes before";
}
else
{
$statement="is the same as";
}
echo "The word $firstword $statement";
?>
You were missing a semicolon:
$result=strcmp($firstword, $secondword);
Justin Garrett
-
PHP does not support threading. Depending on what you're trying to do you
may find the process control functions useful
http://www.php.net/manual/en/ref.pcntl.php
Justin Garrett
"C. F. Scheidecker Antunes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hel
http://www.php.net/manual/en/language.constants.predefined.php
Justin Garrett
"Jacob R Chandler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
What function can I use to find out the current line number?
--
PHP General Mailing List (http://www.php.net/)
To un
Nope. You're stuck with straight single inheritance for now.
Justin Garrett
"Laborda" <[EMAIL PROTECTED]> wrote in message
005201c2cfe9$47c704b0$ad629c40@galaxy">news:005201c2cfe9$47c704b0$ad629c40@galaxy...
>
> Hello,
>
> I have a question.. D
You'd create a linked list in PHP just like you would in most languages,
however IMHO it's best just to stick with PHP arrays. They grow dynamically
and are so easy to work with.
There is an ADT extension scheduled for PHP5
http://www.php.net/~sterling/adt/
Justin Garrett
"L
http://www.php.net/manual/en/language.types.string.php
Just the way ' and " are defined. " understands more escape sequences then
'.
Justin Garrett
"Duncan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
&
http://www.php.net/manual/en/function.addslashes.php
Justin Garrett
"Mike Hilty" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
> I am running into an issue where when a user inputs an apostrophie '
> into th
http://www.php.net/manual/en/function.mysql-insert-id.php
Justin Garrett
"Van Andel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
m...
I have an application that updates two MySQL database tables. One table has
an auto_increment id field. I need to use this
http://www.php.net/manual/en/faq.using.php#faq.using.headers-sent
Justin Garrett
"Chris Winters" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Im SO CLOSE!
>
> Welll to start I had everything running FINE (MySQL, Apache, an
Edit php.ini and add the pear directory to your include_path
or
use ini_set to set your include_path in your script:
http://www.php.net/manual/en/function.ini-set.php
Justin Garrett
"Harring Figueiredo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMA
a = "hi";
$this->hello();
}
}
$foo = new sub;
$foo->hi();
echo $foo->a;
?>
Justin Garrett
"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi there sorry about the long subject , bu
value)
Example 5 is the same as 3 except that it assigns a reference of the value
returned from the Mail class method factory() to $mail_object.
Justin Garrett
"Beau Hartshorne" <[EMAIL PROTECTED]> wrote in message
01c2ce00$d19797d0$6401a8c0@laptop">news:01c2ce00$
class one{
var $prev;
}
class two{
var $head;
function two(){
$this->head = new one();
$this->head->prev = NULL;
}
}
Change prev which is in head which is in this to NULL.
Justin Garrett
"Michael P. Carel" <[EMAIL PROTECTED]> wrot
following will work:
while (!feof($zFile)){
$buffer = fgets($zFile, 4096);
echo "$buffer";
}
Justin Garrett
"Stu9820" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Im new to PHP (came from ASP). I'm tryin
ng IP addresses'
Justin Garrett
"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I haven't heard about address' changing midway through a session (ie,
> without reconnecting), but it's worth pointin
Yup, AOL's proxy servers do this.
Justin Garrett
"Joseph Szobody" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
In a portion of a website, I have implemented user authentication and
management using sessions. When a user first
Let's try that again.
SELECT * FROM table LIMIT 5,5; # get rows 6 - 10
SELECT * FROM table LIMIT 10,5 # get rows 11 - 15
Justin Garrett
> Hi,
>
> I am looking for an example in php/MySql dealing with Next 5 > type of
> queries ..does anyone have any links?
>
> Tha
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SEL
ECTSELECT * FROM table LIMIT 5,5; # Retrieve rows 6-10
SELECT * FORM table LIMIT 10,5; # Retrieve rows 11 - 15Justin Garrett"Pax"
<[EMAIL PROTECTED]> wrote in message
001901c24d49$e7830530$6401a8c0@pawel">news:001901c24d
There are several regular expression and string matching functions you could
use.
http://www.php.net/manual/en/ref.strings.php
http://www.php.net/manual/en/ref.pcre.php
http://www.php.net/manual/en/ref.regex.php
Justin Garrett
<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]"&
Get the current timestamp and subtract a day's worth of seconds.
date('D', time() - 24 * 60 * 60);
Justin
"Kenton Letkeman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have been able to get yesterdays date
> eg. $yesterday = date('d')-1; result is "17"
http://www.php.net/ChangeLog-4.php
As of version 4.2 register_globals defaults to off. You can turn it on in
your php.ini file, but it is recommended to use the new super global arrays
instead.
Justin
"James Daily" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED].
pe 'boolean'. === and
!== not only compare value but type as well.
Justin Garrett
"Chris Boget" <[EMAIL PROTECTED]> wrote in message
07bb01c243c2$1b3045a0$8c01a8c0@ENTROPY">news:07bb01c243c2$1b3045a0$8c01a8c0@ENTROPY...
> > // Note that !== did not exist unt
http://www.php.net/manual/en/install.configure.php
--with-cpdflib[=DIR]
Include cpdflib support (requires cpdflib >= 2). DIR is the cpdfllib install
directory, defaults to /usr.
Justin Garrett
"Don" <[EMAIL PROTECTED]> wrote in message
news:000c01c1c3d5$03b92440$[EMAIL PR
Try it.
But to answer your question, yes. Don't forget to put quotes around your
strings in the case statements.
switch($name){
case "beesly":
break;
}
"Phantom" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The manual shows that you can use s
There is also include_path in the php.ini file.
"Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This is a kind of a "shit happens" answer -- ummm... nope, there's no
> workaround. The only workaround is providing a global path variable and
u
Clibpdf is not complied by default as a Shared Object. Once you compile it
in you should just be able to use it.
--
Justin
"Carlo loiudice" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm trying to install Clibpdf, but when I compile
> the source code, It
>From the manual:
Remember that the header() function must be called before any actual output
is sent, either by normal HTML tags blank lines in a file, or from PHP.
This is the cause of your error. Something is sending output before your
call to header();
--
Justin Garrett
"Don&
Move include("class.jm_sms.php") outside of the loop.
--
Justin Garrett
"Sagar" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I'm using jm_sms class in mysql
> dowhile($myrow=mysql_fetch_ar
But how would you use this to create new global variables with $td as the
prefix?
$td = "foo";
then we want new global variables
$foo_error and $foo_ok created.
--
Justin Garrett
"Jason G." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news
Maybe something similar to this?
function test($td){
$global = "global \$$td"."_error, \$$td"."_ok;";
eval($global);
$set = "\$$td"."_error = \"ERROR\"; \$$td"."_ok = \"OK\";";
eval($set);
}
test(&
$result = mysql_db_query($dname, $sql);
$row = mysql_fetch_object($result);
echo "$row->field_name";
--
Justin Garrett
"Melih Onvural" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i have a database and it randomly s
"$school_type";
$schools = $data[$school_type];
for(reset($schools); $school_name = key($schools); next($schools)){
echo "$school_name";
$teachers = $data[$school_type][$school_name];
$count = count($teachers);
for($i = 0; $i < $count; $i++){
If both times are UNIX timestamps
$seconds_per_day = 60 * 60 * 24;
$dif = $today - $last_day;
$days = (int)($dif / $seconds_per_day);
--
Justin Garrett
"Yang" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i want to check about h
33 matches
Mail list logo