On Thursday, April 18, 2002, at 11:38 AM, Julio Nobrega Trabalhando
wrote:
function custom_function()
{
if ($error == 0) {
return true;
} else {
return Error!;
}
}
if (custom_function() != Error!) {
echo Success;
} else {
echo Error;
}
Your
I don't now of one.
Charlie
Is there one?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Charlie Killian) wrote:
Is there one?
I don't now of one.
That's because PHP doesn't have one, it has two:
http://php.net/preg-quote and http://php.net/quotemeta. (Read the docs
carefully; these functions escape slightly different
Testing reply...
**
Eric Starr [EMAIL PROTECTED] wrote in message
003f01c1d748$8785e200$[EMAIL PROTECTED]">news:003f01c1d748$8785e200$[EMAIL PROTECTED]...
I am learning PHP and I am having some trouble. I am working on a hit
counter application. I am using PHP 4 even though the
Please notice that I am attepting to call a function hitCounterPosition()
in the constructor Counter with this line of code:
$this-mCountPosition = $this-hitCounterPosition();
The very next line in the code prints out the value of mCountPosition
printf( . $this-mCountPosition . BR);
:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 1:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: function calls...Incorrect output...What am I doing
wrong?
Please notice that I am attepting to call a function hitCounterPosition()
in the constructor Counter with this line of code
I mean:
$this-mFileArray:
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 1:13 PM
To: 'Eric Starr'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: function calls...Incorrect output...What am I
doing wrong?
Your problem is that you reference
Scope. Try to pass the values as the function reference (inside the ()),
'global' them, or use $_POST[''], from 4.1 and beyond.
If you don't know what's a 'scope', there's an entry on the manual that
can explain better.
--
Julio Nobrega.
Um dia eu chego lá:
I will try $_POST[] first. I do that under the value parameter for each
form element?
input type=text name=author value=?php $_POST['author'] ?
Right?
--
Julio Nobrega Trabalhando [EMAIL PROTECTED] wrote in message
[EMAIL
you still need to declare the values as GLOBAL
-Original Message-
From: Dr. Shim [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 11:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Function Not Accepting Variable Values From a Form
I will try $_POST[] first. I do that under
function verify()
{
echo Verify called. Values are...br\n
Title: . $_POST['title'] . br\n# This works!
Author: $authorbr\n
Lead Actors: $actorsbr\n
Poster: $posterbr\n
Summ.: $summerybrbr\n\n
Rev.: $reviewbrbr\n\n;
}
--
PHP General
look on php.net for preg_replace and functions like that, they use regular
expressions to replace characters
Digitalkoala [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi folks,
Is there a function that extracts numbers from a string?
I can do this with
OK,...
For each page on my site there will be a different title.
Example:
title
?php
echo ?witakr home?
?
/title
or
title
?php
echo ?witakr News?
?
/title
What I want to know how to take the word that is currently in the place of
News or home.. Wait.. I think I may
I'm sure i confused someone... The $pagetitle1 and $pagetitle are supposed
to be the same... I made a couple typos
--
Jason Whitaker
Jason Whitaker [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
: OK,...
:
: For each page on my site there will be a different
Hi Nick,
did you double-check your query ($qry)? Run it from the mysql client or
from phpMyAdmin to make sure its returning some rows of data.
Cheers,
Bart
Nick Wilson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all
Can anyone see any reason why this function does not
I just saw something with my code there.. i have my link tag inside the
title tag.. i will have to fix that :)
--
Jason Whitaker
Jason Whitaker [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
: Is there a way to set a variable or is there a function that takes
Can you be more specific? I am just guessing here but is this what you want:
? $title = home; ?
html
head
title
? echo $title; ?
/title
/head
body
? echo $title; ?
/body
/html
Perhaps, I am not getting what you are asking for.
On 11 Feb 2002 at 23:34, Jason Whitaker wrote:
I just saw
Jason,
If I understand your question, you want to display the contents of a
variable to screen? Try this:
html
head
title/title
/head
body
?
$test_variable = this is a test;
echo Here is what it says: $test_variable;
?
/body
/html
Also note that you do not need
[EMAIL PROTECTED] (Bryan McCloskey) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:
Hello all,
I'm trying to pass the $HTTP_POST_VARS array into a
function to run some things like strip_tags, trim, and
htmlspecialchars on all of the variables. If possible,
I would like to pass this
Jason G. wrote:
Does anyone know of a way, that from within a function, you can determine
what line number and file the function was called on?
Cannot be done with existing built-in PHP functions...
Feel free to add that feature to the PHP source and contribute it :-)
I did try:
function
Well, I don't know either but I was thinking about that...
Usually this $lineno = __LINE__ would be avaluated when the function is
called, this mean it gives the __LINE__ of the function call itself.
Why don't you try a more simple include/require instead of calling a
funcion ?(see example)
but
Another thing...
if the $lineno variable isn't defined yet, maybe the parser first try a cast
into __LINE__ type, so even if the assign procedure is called at the
function call, the line is evaluated at the funcion definition step...
but maybe it's a bullship :-)
J
Dav [EMAIL PROTECTED] ha
D'oh!!!
That's what I get for trying copying and pasting with Mandrake's screwy
./configure line! An oddly altered php.ini file was indeed the problem.
Seems obvious in retrospect -- php.ini was trying to load Mandrake's old
dynamic modules that are already static in my new PHP Module, so
I guess that is not possible with PHP yet.
Jason G. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello,
Does anyone know of a way, that from within a function, you can determine
what line number and file the function was called on?
I did try:
function
Hello Mike,
Thursday, October 25, 2001, 10:09:18 PM, you wrote:
MF Actually your problem is with the function itself. In order for it to work
MF you need to use the this keyword:
MF class A {
MF var $xxx;
MF function print() {
MF echo $this-xxx;
MF }
MF }
MF You may also
Actually your problem is with the function itself. In order for it to work
you need to use the this keyword:
class A {
var $xxx;
function print() {
echo $this-xxx;
}
}
You may also run into problems with calling the function print(), I don't
know for sure. But the problem
Richard
I don't think there is such a documented function available in PHP yet...
Use the source, and do it. :-)
Sadly I am a humble PHP hacker with no system programming skills, so I'll
have to leave it to the experts. Still - it would be a very useful feature,
I think, if anyone with the
Nafiseh Saberi [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
hi.
do we have function like exit in php??
for exit from program.
best regards.
For the love of.
1) yes. its called exit you can also use die
2) the simplest of searches on www.php.net
Given a multidimensional array with words as keys, I want to match
the values of each array with the keys of the array and build a new
array that reflects these relationships as a sort of tree. So, in
the list below, fruit, apples, oranges, red are the keys and
in the fruit array are the
You might wanna make a function for links:
?php
function makelink($descr, $href) {
global $printer;
if ($printer) {
$link = $descr ($href);
} else {
$link = a href=\$href\$descr/a;
}
return $link;
}
To echo an link in a site, do:
html above
?php
echo
Sed [EMAIL PROTECTED] wrote in message
009301c10a46$3db4eba0$0100a8c0@mamma">news:009301c10a46$3db4eba0$0100a8c0@mamma...
I'm making a map (image) which you can click on and the script finds the
area-code based on where you click on the map.
Before I spend time on writing my own code to find
Thanks to Lasse I found a good solution, you can view it here:
http://softlab.od.ua/algo/other/alg/node158.html
Thanks!
SED
-Original Message-
From: Lasse [mailto:[EMAIL PROTECTED]]
Sent: 11. júlí 2001 22:02
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Function? How to find if xy
/e-mail-disclaimer.html
-Original Message-
From: Fang Li [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 14:03
To: Tim Ward; 'Jimmy Bäckström'; PHP General List
Subject: RE: [PHP] RE: Function to compare an array with another array
Hi,
I am trying to use the Function ArrayCompare
why are you using this construct instead of echo()?
e.g. echo("Hey there " . foo::bar($baz) . " how are you doing?");
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
function ArrayCompare($array1, $array2)
{ $answer = new Array()
foreach ($array1 as $element)
{ if (($key = array_search($element, $array2)) === false)
{ $answer[$key] = $array2[$key];
}
}
return $answer;
}
this
101 - 135 of 135 matches
Mail list logo