I would approach this by first going here:
http://www.php.net/manual/
And go to the section on types:
http://www.php.net/manual/en/language.types.php
In there is a section for type juggling:
http://www.php.net/manual/en/language.types.type-juggling.php
From these places you'll see
with arrays inside strings:
echo an {$array['key']} b;
echo 'an ' . $array['key'] . ' b';
echo an $array[key] b;
See also:
http://www.zend.com/zend/tut/using-strings.php
http://www.php.net/manual/en/language.types.string.php
Regards,
Philip Olson
On Sat, 28 Sep 2002, Gary wrote:
Hi
Please read this:
http://www.php.net/manual/en/language.variables.external.php
Regards,
Philip Olson
On Sun, 14 Jul 2002, Mike Heffner wrote:
Hi,
I've recently upgraded from PHP 4.0.4p11 - PHP 4.2.1, but now there seems
to be a problem that variables from POST/GET are not being passed
/language.variables.external.php
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
through the
predefined server array instead, it's sexier:
print $_SERVER['PHP_SELF'];
See also:
http://www.php.net/manual/en/reserved.variables.php
Regards,
Philip Olson
On Sat, 13 Jul 2002, David Duong wrote:
Is their a function that returns an equivalent of $PHP_SELF?
--
PHP
/language.types.string.php
Regards,
Philip Olson
On Thu, 11 Jul 2002, Michal Dvoracek wrote:
Hello,
IMHO string is array of characters
so is possible:
$str = 'string';
for ($i = 0; $ count($str); $i++)
echo $str[$i];
Regards,
Michal Dvoracek [EMAIL PROTECTED]
Capitol
examples and various links.
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Please read:
http://www.php.net/manual/en/language.variables.predefined.php
Regards,
Philip Olson
On Wed, 10 Jul 2002, vins wrote:
OK if you are running php on apache and your form variables don't pass
through
fire up your editor and edit php.ini and turn Register Globals
Please read this manual page, it has examples
to suit your needs:
http://www.php.net/manual/en/language.variables.external.php
Regards,
Philip Olson
On Wed, 10 Jul 2002, sven vandamme wrote:
on my page (lessen.php)
i have a variable $sort
if this varible is empty if enterd the page
book that you have has a typo, there
simply is no php_info().
Regards,
Philip Olson
On Wed, 10 Jul 2002, George Hester wrote:
Thanks that worked just fine. But now I am irritated as hell. Obviously there
is no backwards compatibility with new releases. Does this mean if I install a
new
It could stem from the variables_order directive,
if it lacks an E.
Regards,
Philip Olson
On Tue, 9 Jul 2002, Analysis Solutions wrote:
On Tue, Jul 09, 2002 at 07:34:13AM -0700, Todd Cary wrote:
The version of PHP on one is 4.0.3pl1 and on the other it is 4.0.1pl2.
Here is what
request data is unsafe. The only filter I
see here is how the data is seperated by type, ex. only
GET is in $_GET.
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
are autogenerated and this issue
is being looked into. The correct docs on this are
now in phpdoc CVS and will show up soon.
In short, don't attempt to set register_globals
at runtime as explained by a few in this thread,
it won't fully work as expected.
Regards,
Philip Olson
--
PHP
. for this topic, it's been
discussed a lot lately :)
Regards,
Philip Olson
On Mon, 8 Jul 2002, Terry Cheung wrote:
Hi,
I have just downloaded the latest source of apache, php, mod_ssl and
mysql to build them all together. It can show the php page and can connect
to the mysql database
Please don't repeat your questions, see the
other post for details. In short, it has to
do with register_globals directive in php.ini
Regards,
Philip Olson
On Tue, 9 Jul 2002, Terry Cheung wrote:
I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old
php script files
Hello Rasmus-
How do you suggest ini_set() document these differences? Maybe
the table at ini_set() could use another column, for descriptions
and notes. Also, could you give a concise description for the
differences between local and master values?
Regards,
Philip Olson
On Mon, 8 Jul
See http://www.php.net/strip_tags
On Fri, 5 Jul 2002, Anil Garg wrote:
Hi,
How to do whats written in the commented line(//) in the code below:
?php
$term = .Btest/b;
if(stristr($term,) stristr($term,) !stristr($term,br)
!stristr($term,p) ){
printf(its html tag);
// here i
It's a term with many different meanings. See:
http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?RTFM
On Fri, 5 Jul 2002, Scott Fletcher wrote:
What is RTFM??
Jason Wong [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Friday 05 July 2002 22:20, Scott
For session id, use session_id()
http://www.php.net/session_id
Regards,
Philip Olson
On Fri, 5 Jul 2002, Scott Fletcher wrote:
Not a problem! I noticed the PHPSESSID only showed up on $_COOKIE and
nothing else. I dont' want to use the $_COOKIE, so I may either assign it
to $_SESSION
to not rely on register_globals = on. In
fact, this directive is deprecated and may not work one
day. As of PHP 4.2.0 this defaults to off in php.ini.
See also:
http://www.php.net/manual/en/language.variables.predefined.php
http://www.php.net/registerglobals
Regards,
Philip Olson
On Fri, 5
Rename php.ini-dist to php.ini and modify it
according to your needs (also read all the
notes contained within).
Regards,
Philip Olson
On Thu, 20 Jun 2002, Anil Garg wrote:
hi,
how can i change the maximum size of the file being uploaded??
The line below does not seem to help me
will affect your use of addslashes().
Regards,
Philip Olson
On Thu, 20 Jun 2002, Erik Price wrote:
On Thursday, June 20, 2002, at 12:19 PM, James Drabb wrote:
I was wondering if there is a setting to make PHP not change the posted
data? For
example I am posting a first and Last name
:
http://www.php.net/include
In your case above, $var will already be available
to website.php if you simply include it.
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try the error_reporting function, which is also
a PHP directive in php.ini
http://www.php.net/manual/en/features.error-handling.php
http://www.php.net/error_reporting
Although you should just fix the errors ;)
Regards,
Philip Olson
On Wed, 19 Jun 2002, Shashwat Nagpal wrote:
Hi! I did
/knowledge_base/view.phtml/aid/31
Regards,
Philip Olson
On Thu, 13 Jun 2002, Webmaster do Aborla.net wrote:
Hello,
Why $HTTP_USER_AGENT don't work?? I can't get it's value, but in phpinfo the
value appears. why this???
Thanking in advance,
Nuno Lopes
--
PHP General Mailing List (http
Some popular editors that meet your OS requirements (win32),
all have PHP syntax capabilities (in no particular order):
- ultraedit
- editplus
- textpad
- zend ide
- homesite
Download and try them all :)
Regards,
Philip Olson
On Thu, 13 Jun 2002, Daniele Baroncelli wrote:
Hi guys
Regards,
Philip Olson
On Wed, 12 Jun 2002, Martin Clifford wrote:
Howdy,
If someone out there could tell me how to get rid of a single key/index pair within
an array, it would be great. I've tried both unset() and empty(), but both destroy
the entire array.
Please CC me directly, as I'm
phpinfo() or simply print_r($_GET) for GET. Regarding
your specific question, see the above words and:
http://www.php.net/manual/en/security.registerglobals.php
Regards,
Philip Olson
* Assumes the PHP directive track_vars = on, which it always
is past 4.0.2.
--
PHP General Mailing List (http
, 'jim' = $y, 'mike' = $z);
$keys = array_keys($my_array);
print $keys[0]; // bob
print $keys[1]; // jim
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
are some options. See also:
http://www.php.net/manual/en/language.variables.predefined.php
Regards,
Philip Olson
On Fri, 7 Jun 2002, Beeman wrote:
I just read the release notes and do not believe they are referring to my
dilemma.
Here is the code I am using. Just a basic form
Form.php
This is not how they work, the name goes
under select not within option.
And as others have suggested, using an
array is key here: name=bleh[].
http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple
Regards,
Philip Olson
On Thu, 6 Jun 2002, Jay Blanchard wrote:
[snip
not fear the manual. It may seem
a little scary at first but it'll start to click
more and more for you. Good luck :)
Regards,
Philip Olson
On Wed, 5 Jun 2002, _michael wrote:
tight i have tried what you said:
$last_mod = filemtime($file);
$tdate = date
A bug existed in 4.1.x regarding this
directive, and was fixed in 4.2.0.
Sorry I can't give any specifics (as I've
forgotten them) but see the changelog:
http://www.php.net/changelog
Regards,
Philip Olson
On Tue, 4 Jun 2002, Daniel Kushner wrote:
This variable isn't getting populated
Jim-
Please don't post such useless garbage to the lists. The
thread was dead, mistakes were made, time to move on. We
all make mistakes from time to time (frustration), and can
only learn from them. Draft folders are good.
Regards,
Philip Olson
and you want people to actually ready
but will work (eww)
print '$foo'; // literally prints a string $foo and
// not the value of $foo. bad.
Read/study this tutorial on using strings:
http://www.zend.com/zend/tut/using-strings.php
Good luck, you'll get the hang of it soon :)
Regards,
Philip Olson
On Mon, 3 Jun
Please post:
a) the error
b) if the error is line #5, just post related lines line 4-6.
I did see this:
$result = mysql_query('$query', '$link_glob');
Which should be:
$result = mysql_query($query, $link_glob);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
the '' from your code,
odds are it'd shout an error too. '' can be useful for
supressing errors so we can implement our own form of
error management/trapping, like in the above.
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
oops, i forgot a for mysql_connect() but oh
well, you get the point :)
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
global $var; does nothing outside of a function. You
do not need to use global for this.
$foo = 'bar';
include 'something_that_uses_foo.inc';
http://www.php.net/manual/en/language.variables.scope.php
regards,
Philip Olson
On Sun, 2 Jun 2002, Anzak Wolf wrote:
I have a question about
For tips on doing these things, read this faqt:
http://www.faqts.com/knowledge_base/view.phtml/aid/124
Regards,
Philip Olson
On Sun, 2 Jun 2002, Andrew Brampton wrote:
Hey try it, it works when are running the PHP Module in apache.
I have a server with proxy.php yet I access it via
,
tutorials, etc. rely on it on, which makes life interesting
in the PHP world today.
http://www.php.net/manual/en/security.registerglobals.php
There are many predefined variables, such as $_GET, too.
http://www.php.net/manual/en/language.variables.predefined.php
Regards,
Philip Olson
for a CONSTANT named key first, instead.
define ('a','b');
$arr = array('a' = 'apple', 'b' = 'banana');
print $arr[a]; // banana
print $arr[a]; // apple
print $arr['a']; // apple
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
://www.php.net/manual/en/language.types.string.php
One thing you can do is escape it: \'
regards,
Philip Olson
On Sun, 2 Jun 2002, Craig Vincent wrote:
If the error is a warning about undefined variable, then set a default
value for $errmsg before you start adding strings to it.
$errmsg
On a sidenote (picky), consider making variables all
lowercase. Also when printing a single var, no need to
surround it with quotes. print $foo.
Regards,
Philip Olson
On Fri, 31 May 2002, Christopher J. Crane wrote:
I like this piece of code. In fact, I convert all my scripts that use
'];
// Works since PHP 4.1.0
print $_SERVER['HTTP_REFERER'];
Btw, $GLOBALS['HTTP_REFERER'] === $HTTP_REFERER.
And lastly, since PHP 4.2.0 the register_globals
directive defaults to off, which is what Jim was
indirectly referring to. See also extract().
Regards,
Philip Olson
* For versions older
it was important
enough to mention some.
Regards,
Philip Olson
Jim lucas
- Original Message -
From: Philip Olson [EMAIL PROTECTED]
To: Jim lucas [EMAIL PROTECTED]
Cc: Kris Vose [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 11:03 AM
Subject: Re: [PHP] diplaying
of doing this at runtime here:
http://bugs.php.net/bug.php?id=17428
It might help too. Also read:
http://www.php.net/manual/language.variables.predefined.php
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, and then some.
Note that error_reporting is both a function (runtime)
and a php directive.
Most PHP users feel that developing with E_ALL is good.
Regards,
Philip Olson
CYA, Dave
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
($words) .'hi/a';
Which essentially makes:
yep.php?motto=Cheese+is+good
More information on what urlencode exactly does and
related information (like for htmlentities), see the
manual entry:
http://www.php.net/urlencode
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net
[id] to get the value of one, with them ON, you can just use $id.
Just to be clear, $_GET['id'] will work fine with register_globals
on or off. In otherwords, these php predefined variables will
exist either way. Just like the older non-super ones, such as
$HTTP_GET_VARS.
Regards,
Philip Olson
light on this?
I hope so :)
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
make $dir a local directory, try for example:
$dir = '.';
regards,
Philip Olson
On Fri, 24 May 2002, _michael wrote:
well do you think you can point me in the right direction to listing the
files on my site? - is it possible (as i said i am very new to this)
thanks
-Original
Read a tutorial about using strings here:
http://www.zend.com/zend/tut/using-strings.php
The manual also talks about them:
http://www.php.net/manual/en/language.types.string.php
Regards,
Philip Olson
On Fri, 24 May 2002, Shane wrote:
Question Please.
What is the syntax for getting
if only there were, 'get_magic_quotes_sysbase();'
happy birthday ;)
function get_magic_quotes_sybase()
{
if (!ini_get('magic_quotes_sybase')) {
return 0;
} else {
return 1;
}
}
feature requests can be submitted at:
http://bugs.php.net/
regards,
Philip Olson
extract($_POST, EXTR_PREFIX_ALL, 'file_');
A little typo, extract() automatically attaches
a '_' so the third parameter here would be just
'file'.
This behavior is unlike import_request_variables()
and I assume the behavior remains for historical
reasons. Kinda odd.
Regards,
Philip
;
But it depends, going through predefined variables
everytime can be fun too.
Regards,
Philip Olson
On Thu, 23 May 2002, Tyler Longren wrote:
Hi,
Just to prevent a bunch of non-helpful e-mails, I've already RTMF!
Now, to the point. When using the new variables in php 4.2.x, how should I
go
in the PHP manual.
http://www.php.net/manual/
Regards,
Philip Olson
On Wed, 22 May 2002, [Windows-1252] Johan Ekström wrote:
Okay, mystery to me, when I installed PHP 4.2.1 on Apache 2.0.35, the track_vars
function, stopped working.
a simple command like, example :
file : default.php
not exist a user could
pass a get variable $foo through the url ... Just a simple
example :)
The following post might help clear things up regarding
superglobals, variable scope, and register_globals:
http://marc.theaimsgroup.com/?l=php-generalm=102036870428992
Regards,
Philip Olson
See:
http://www.php.net/get_defined_vars
Regards,
Philip Olson
On Thu, 23 May 2002, William_dw -- Sqlcoders wrote:
Hi there!,
I'm looking for a way to loop through the symbol table.
In other words I want to be able to loop through every variable defined in
the local scope.
I've
by \n.
Regards,
Philip Olson
manisha
At 04:59 AM 5/23/02 +0300, you wrote:
Get a database working! That's definitely worth investing some time in -
apart from the obvious speed avdantages, you'd learn a lot.
About your question, AFAIK you can only do it by reading from one file
)) {
extract($row);
print Hello $foo, I like $bar too\n;
}
?
Regards,
Philip Olson
On Sun, 19 May 2002, Justin Latham wrote:
I am trying to clone my webserver because I am switching ISPs. So I copied
the MySQL database, and then I copied the php pages. But my new server
insists
of course depends on the situation and
the person.
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
see also: $_REQUEST, extract() and/or
import_request_variables()
Regards,
Philip Olson
On 14 May 2002, Jeff Bearer wrote:
Quick question if I'm programming with register globals off, and want to
get a variable that is allowed to be set with either a GET or POST
method, is there 1 variable
These are called variable variables, and can
be read about here:
http://uk.php.net/manual/en/language.variables.variable.php
Replace your [ ] with { } and you'll be good
to go.
Regards,
Philip Olson
On Tue, 14 May 2002, Steven Walker wrote:
Hi,
I couldn't find
On Tue, 14 May 2002, Rasmus Lerdorf wrote:
Turn on register_globals in your php.ini file and things should start
working again.
That reply was way too short and easy ;)
On Tue, 14 May 2002, Weston Houghton wrote:
All,
I've recently upgraded from 4.1.2 to 4.2.0. And of course my
Please read the following:
Using Strings in PHP
http://www.zend.com/zend/tut/using-strings.php
Strings
http://www.php.net/manual/en/language.types.string.php
Notice stripslashes(), addslashes(), the PHP directive
magic_quotes_gpc and the use of ' vs .
Regards,
Philip Olson
On Tue
to the script. And print_r() will also be helpful
for various activities too.
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
://www.php.net/manual/en/language.variables.predefined.php
Regards,
Philip Olson
-Original Message-
From: Alex Shi [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 10:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How can obtain referer's name?
Hi!
I want to know how can a script
];
}
The first used , which is a bitwise operator. See
also the following faqt:
How can I show rows from a database in a table with
alternating colors?
http://www.faqts.com/knowledge_base/view.phtml/aid/783
Regards,
Philip Olson
On Fri, 10 May 2002, Miguel Cruz wrote:
While everyone's
['bar'], EXTR_PREFIX_ALL, 'bar');
print I say $bar_name and $bar_doh;
extract() is a pretty cool function with many
options, read about extract here:
http://www.php.net/extract
And as already stated by others,
import_request_variables() and $_REQUEST exist too.
Regards,
Philip Olson
On Mon
=php-generalm=101803683730027
Re: tutorial on global variables
http://marc.theaimsgroup.com/?l=php-generalm=102036870428992
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
versions of PHP it does try
to do something but not sure exactly what ... yet.
I'm assuming it returns -1 for you, in PHP3.
Regards,
Philip Olson
On Fri, 3 May 2002, ROBERT MCPEAK wrote:
Running PHP3 on a Linux box and I've got trouble with date().
Here's the code:
$blah=2002-05-02
)
$str = Hello {$there['friend']}, how are you?;
// Concatenation is always a possability
$str = 'Hello ' . $there['friend'] . ', how are you?';
Related resources:
http://www.php.net/en/language.types.string.php
http://www.zend.com/zend/tut/using-strings.php
Regards,
Philip Olson
just created $REMOTE_ADDR because register_globals is off';
print \nREMOTE_ADDR: $REMOTE_ADDR;
} else {
print 'register_globals is on so $DOCUMENT_ROOT et al already exists';
print \nDOCUMENT_ROOT: $DOCUMENT_ROOT;
}
Phew, hope that helps :)
Regards,
Philip Olson
--
PHP General
This is a feature request, see:
stri_replace() to compliment str_replace() :
http://bugs.php.net/bug.php?id=5919
Regards,
Philip Olson
On Thu, 2 May 2002, CC Zona wrote:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Reuben D Budiardja
See the register_globals directive. If it
is on, $argv will be created. Otherwise it
will not. And as we all now know, PHP 4.2.0
defaults register_globals = off.
Consider using $_SERVER['argv'] instead.
regards,
Philip Olson
On Fri, 3 May 2002, Andre wrote:
Is there something
() before
sending it through the url, or any string for that
matter. See: http://www.php.net/urlencode
Regards,
Philip Olson
On Wed, 1 May 2002, Luiz Rafael Culik Guimaraes wrote:
Dear Friends
I have an form that get the user info , and i need to send an email to the
user .
which
mentioning that one can control error
levels both at runtime (error_reporting()) as
well as in php.ini (.htaccess, etc).
Regards,
Philip Olson
On Tue, 30 Apr 2002, TGL wrote:
I'm new to PHP and can't get through my first script. I want to create a
form that will allow the user to attach a file. I
Some things to consider:
a) please read my first post :) (re: isset/empty/error_reporting)
b) $FILE != $File != $file (case sensitive)
regards,
Philip Olson
On Thu, 2 May 2002, nico_free wrote:
- Original Message -
From: nico_free [EMAIL PROTECTED]
To: TGL [EMAIL PROTECTED
/predefined constants.
Regards,
Philip Olson
p.s. Controversy surrounds these magic constants,
are they *really* constants? Inquiring minds
want to know. :)
http://www.php.net/constants
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Here's a bug report:
file() - incorrect behavior (line endings ignored) on
files with Mac EOLN (CR)
http://bugs.php.net/bug.php?id=16521
Maybe some kind soul will fix this before PHP 4.3.0 :)
http://cvs.php.net
Regards,
Philip Olson
On Thu, 2 May 2002, eat pasta
: import_request_variables() and extract().
Regards,
Philip Olson
On 30 Apr 2002, Jeff Bearer wrote:
I have a server where I'm running some third party apps.
until now I've had register globals 'on', now I have a new app that
requires register globals 'off' for it to work, if I change
because $SERVER_NAME is created IF the php
directive register_globals = on. this setting
is off by default as of PHP 4.2.0. all
server predefined variables behave this way,
such as $PHP_SELF, etc.
regards,
philip
On Sat, 27 Apr 2002, John Holmes wrote:
Use $_SERVER[SERVER_NAME]
also consider extract or import_request_variables
as they can be useful too.
regards,
philip olson
On Sat, 27 Apr 2002, John Holmes wrote:
Register_globals is off by default and you have to use the $_GET and
$_POST arrays for your data.
---John Holmes...
-Original Message
, if so, include
it else houston we have a problem
Regards,
Philip Olson
On Sat, 27 Apr 2002, Stuart Dallas wrote:
$incfilename = Calc.$state..class.inc;
if (file_exists($incfilename))
include($incfilename);
else
echo Please select a State.br\n;
--
Stuart
of these will always be available (nobody uses 4.0.2-
anymore right? Phew, no need to bring up track_vars
then :)
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hmm, I swore this was changed back to .tar.gz :)
Anyway, read this faq:
http://www.php.net/manual/en/faq.misc.php#faq.misc.bz2
Regards,
Philip Olson
On Sat, 27 Apr 2002, r wrote:
Greetings all,
Special greetings to:
one brainy dude - Steve, and a REALLLY persistive dude-Michael
/language.variables.predefined.php
Also consider extract and import_request_variables, I posted
a bit about them awhile back here:
http://marc.theaimsgroup.com/?l=php-generalm=101803683730027
And when in doubt, send your script to a call of phpinfo() and
it'll provide a ton of useful information.
Regards,
Philip
== false. == !=, === !==. So, 0 !== false.
Wow that sounds confusing. :) Also consider the sexy array_keys()
function.
Regards,
Philip Olson
p.s. http://uk.php.net/manual/en/language.operators.comparison.php
p.s.s. also take into account extra whitespace (trim), and potential
issues
To stop receiving the messages from undefined variables add this at top
of your files:
error_reporting(55);
Or better yet, keep as you're doing and develop with E_ALL
and fix those E_NOTICE errors correctly! ;)
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net
Here are a couple resources to help
your cause:
http://uk.php.net/strip_tags
And to get ideas on how to validate
forms intelligently:
http://www.zend.com/zend/spotlight/form-pro-php4.php
Regards,
Philip Olson
On Thu, 25 Apr 2002, Tarjei Huse wrote:
Hi,
I need a function
) {
$str{$pos} = '!';
}
print $str;// Hello! I love you!';
print $pos;// 5
print $str{0}; // H
print $str{5}; // !
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
consider using urlencode() in addition to
one of the above methods. Anyway:
$arr1 = explode('|', $vars1);
$arr2 = unserialize($vars2);
Ah yes, our arrays are back :)
Regards,
Philip Olson
On Wed, 24 Apr 2002, Pushkar Pradhan wrote:
I want to pass a 1 dim. array through a form, I use
use is_numeric()
http://uk.php.net/is_numeric
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there an easier way than having to manually place global
in each function...??
It's not that hard :)
Other than passing by parameter?
Like is it possible to actually declare var's in PHP
as global?
No. Consider arrays, constants, extract(), etc.
Regards,
Philip
--
PHP
ideas, have fun!
Regards,
Philip Olson
p.s. Use a mirror
http://uk.php.net/mirrors.php
On Fri, 5 Apr 2002, Miguel Cruz wrote:
On Fri, 5 Apr 2002, cyberskydive wrote:
So I wanna learn how to code properly with register_globals off, I reead on
PHP.net about the new auto globals and inmy new
Is there a way to emulate var_dump(), print_r() so I can write it to a
file and when I open this file the information are shown like if I really
did a print_r();?
ob_start();
print_r($doo);
$dah = ob_get_contents();
ob_end_clean();
echo $dah;
and just
Unchecked checkboxes pass no values, that's how
it works. It's either set or not. Default value
for a checkbox is 'on' although you can change
that. isset() will work fine.
Regards,
Philip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
being a column name
// selected via the query
print $row['name'];
And lastly, if you're not going to use all the data,
don't SELECT * of it.
Good start, keep it going :)
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
idea too. The PHP manual and website are
live entities always looking for ways to improve.
Regards,
Philip Olson
p.s. http://www.google.com/ is your friend.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
201 - 300 of 599 matches
Mail list logo