Re: [PHP] Re: require & include

2001-10-23 Thread Philip Olson
tus of pre 4.0.2 and is in the process of being updated. regards, Philip Olson On Tue, 23 Oct 2001, Steve Cayford wrote: > So both include() and require() *are* subject to conditional statements > in the code? Guess I missed that. > > Thanks. > > -Steve > > On Tuesday, Octo

Re: [PHP] INPUT tag with default value

2001-10-23 Thread Philip Olson
This is not possible. Default values cannot be set with type=file as if it were it would be quite a security risk.A little more information on the capability of this html form element: http://www.blooberry.com/indexdot/html/tagpages/i/inputfile.htm And a related RFC : http://www.faqs.or

Re: Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread Philip Olson
[1] => d [2] => e ) In the above, $second_half will be one larger then $arr if the number of elements is odd, otherwise they'll be equally sized halves. Using ceil() as opposed to floor() will make $second_half the smaller of the two. Regards, Philip Olson On Wed, 31 Oct 2001, Daniel

Re: [PHP] Re: Where are lists of PHP's predefined constants andkeywords?

2001-10-31 Thread Philip Olson
k as expected: print $arr['mysql_connect']; print $arr['unset']; print $arr['empty']; Not suggesting these names be used as array keys though :) Regarding reserved words, they can be seen here: http://www.php.net/manual/en/reserved.php Regards, Philip Olson

Re: [PHP] simple array tutorial wanted

2001-11-01 Thread Philip Olson
Hi Justin, That man page is pretty descriptive and contains many examples. It's sorta like a tutorial :) If there is information you (or anyone) feels is missing, please say so and it'll be looked into and perhaps added. Regards, Philip Olson On Fri, 2 Nov 2001, Justin Fr

Re: [PHP] Conversion number two?

2001-11-20 Thread Philip Olson
perhaps you want to do the following: function foo($str) { return explode(' ',$str); } $required = foo('name address phone'); regards, Philip Olson On Tue, 20 Nov 2001, Brandon Lamb wrote: > Here is the php version > $required = array('name','

Re: [PHP] mail() function

2001-11-20 Thread Philip Olson
See: http://www.php.net/manual/en/function.mail.php an example lives there. The key here is that additional headers, such as From: will go in the optional additional_headers parameter. Regards, Philip Olson On Tue, 20 Nov 2001, Ben Clumeck wrote: > I am new to PHP. I am trying to spec

Re: [PHP] Address Standardization

2001-11-20 Thread Philip Olson
gards, Philip Olson On Tue, 20 Nov 2001, Jeff Lacy wrote: > Hello, > > Does anyone have a good function or ideas about address standardization? I > need some form of it in a web-app I am trying to write, but I don't know > where to begin. > > Thanks, > > Jeff > &

Re: [PHP] What does &var mean ?

2001-11-22 Thread Philip Olson
> What does the "&" (ampersand) before the variable name mean ? It's called a reference, check out: http://www.php.net/manual/en/language.references.php regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PRO

Re: [PHP] Hour Calculation

2001-11-24 Thread Philip Olson
eps #1-2 would already involve unix timestamps. A hack can be created but let's try to avoid that :) regards, Philip Olson On Sat, 24 Nov 2001, neeraj wrote: > Hi List, > > !! Please help !! > My problem, > 1) My Start time for a xyz file is 11.15 am 14-11-2001 > 2)

Re: [PHP] Installing PHP 4 on a RAQ3

2001-11-25 Thread Philip Olson
be of some use: http://www.php.net/manual/en/install.unix.php regards, Philip Olson On Sun, 25 Nov 2001, Phil Ewington wrote: > Hi, > > As I have only ever worked on a Windows platform, installing PHP & MySQL on > a RAQ3 is completely alien to me. I attempted to install the binari

Re: [PHP] PHP 4.1.0 is_dir bug

2001-12-13 Thread Philip Olson
p/php4/NEWS regards, Philip Olson On Thu, 13 Dec 2001, Alok K. Dhir wrote: > > With PHP 4.1.0, all calls to is_dir which would have returned false now > report a "stat failed" warning as a bonus. Using @is_dir to quiet it > for the time being, but I'd imagine this

Re: [PHP] register_globals not turning off

2001-12-13 Thread Philip Olson
what command? if you're using ini_set you can't. in this case it'll set the local value but it's of no consequence, register_globals has already done its thing before getting to the script. use of .htaccess is possible. regards, Philip Olson On Thu, 13 Dec 2001, Charlie

Re: [PHP] PHP & ssi

2001-12-21 Thread Philip Olson
Try virtual() http://uk.php.net/virtual Something like: virtual('cgi-bin/ssirand.cgi?REGION=Sports'); regards, Philip Olson On Fri, 21 Dec 2001, Nick wrote: > Well the include line I needed was this: > > Shane > > > > On Friday 21 Dec 2001 5:45 pm,

Re: [PHP] SSI

2001-12-22 Thread Philip Olson
lude() in php manual too. Regards, Philip Olson On Fri, 21 Dec 2001 [EMAIL PROTECTED] wrote: > if you have a PHP page and you want to use SSI in it... is there a special > method? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMA

Re: [PHP] Does mail() can be used to send attachments?

2001-12-22 Thread Philip Olson
see: http://www.php.net/manual/en/function.mail.php a link to a tutorial/rfc exists there. also, check the various script archives for mail packages, most allow for attatchments. regards, Philip Olson On 22 Dec 2001, Dasmeet Singh Arora wrote: > Is it possible to send attachments us

Re: [PHP] Function definition: how to make default argument an emptyarray?

2001-12-22 Thread Philip Olson
> In pseudo-code: > > function makeyogurt ($flavour, $type = 'EMPTY ARRAY') > { } function makeyogurt ($flavour, $type = array()) { ... } or function makeyogurt ($flavour, $type = array('a','b')) { ... } regards, Philip

Re: [PHP] Re: spliti[SOLUTION]

2001-12-22 Thread Philip Olson
s will exist. This will also make for a more reliable word count although it won't be perfect. For examples on posix regex (which is taken on by split), see: http://www.phpbuilder.com/columns/dario19990616.php3?print_mode=1 regards, Philip Olson On Sat, 22 Dec 2001, Bharath Bhushan Lohray

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Philip Olson
)) != "H" && > srtoupper(substr($xmbrcode,11,1)) != "O") { See above. Btw, consider something like: $str = '123456789abcdef'; $bad = array('B','P','H','O'); if (in_array(strtoupper($str{11}),$

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Philip Olson
2 Anyway, what was the question again? :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Client side fatal PHP error

2001-12-25 Thread Philip Olson
will happen every time. Check your error_reporting setting *shrugs* See the email I just posted. > Ah it's always something thanks much. Yep :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: [PHP] 4.10 New Vars Question

2001-12-25 Thread Philip Olson
variables section of manual and phpinfo(). regards, Philip Olson On Tue, 25 Dec 2001, Edward Marczak wrote: > Hello! > > Two items in the new 4.10 change-log caught my attention: > > *Introduced a new $_REQUEST array, which includes any GET, POST or > COOKIE variables. Like the o

Re: Re: [PHP] 4.10 New Vars Question

2001-12-25 Thread Philip Olson
her than those on the changelog too. The new vars will be listed and described in the manual eventually (fairly soon). For now, read the above release notes. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: [PHP] Reverse effect of htmlspecialchars

2001-12-25 Thread Philip Olson
> Anyway to reverse the effect of htmlspecialchars? See the docs found here: http://www.php.net/manual/en/function.get-html-translation-table.php Shown there is a way to do this. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EM

Re: [PHP] not working

2001-03-21 Thread Philip Olson
What are you wanting to do? Let's assume : a. You want soon-to-be-included file names to depend on values passed through the url QUERY_STRING (links). (also, be careful) b. The file containing this code is called home.php Let's slightly modify your code : Test Is that what you're wanting

Re: [PHP] Free Web Space

2001-03-22 Thread Philip Olson
Check out this list : http://www.faqts.com/knowledge-base/view.phtml/aid/4058/fid/27 Regards, Philip On Thu, 22 Mar 2001, PIS Alaiddin Tayeh wrote: > Is there any place in the internet gives free hosting like > (freeservers.com,geocities.com ..) supporting PHP/MySQL? > > Alaiddin > > --

Re: [PHP] Form help

2001-03-22 Thread Philip Olson
re works if the form names are an array, like : Other considerations apply but if $form is an array then most likely the user used the form. So : if ( is_array($form) ) { Regards, Philip Olson http://www.cornado.com/ On Thu, 22 Mar 2001, Good Fella wrote: > Hi All, > > I currently

Re: [PHP] Unwanted signs!

2001-03-22 Thread Philip Olson
Check out : http://www.php.net/manual/en/function.strip-tags.php So : $input = 'name'; $input = strip_tags($input); echo $input; // name Regards, Philip Olson http://www.cornado.com/ On Thu, 22 Mar 2001, Brian Rosenkrantz wrote: > I'm new to php (and f

Re: [PHP] Delaying Printed Output

2001-03-24 Thread Philip Olson
to go along with this, check out : Output Control Functions : http://www.php.net/manual/en/ref.outcontrol.php and some interesting ones in the Misc section : Miscellaneous Functions : http://www.php.net/manual/en/ref.misc.php links to a few tutorials are listed in ocf section. speaki

Re: [PHP] URL parsing

2001-03-25 Thread Philip Olson
rite Regards, Philip Olson http://www.cornado.com/ On Sun, 25 Mar 2001, Jaxon wrote: > oops :) > > http://www.domain.com/index.php/main/index.html?ii=1 > versus > http://www.domain.com/index.php/main/index.html > > I want to get "index.html" and "mai

Re: [PHP] script filename?

2001-03-25 Thread Philip Olson
/manual/en/function.basename.php Also check phpinfo() to view how your server deals with such things. Regards, Philip Olson http://www.cornado.com/ On Sun, 25 Mar 2001, Kurth Bemis wrote: > i was pretty sure that there was a function to return JUST the script > filename.. Unlike $php_se

Re: [PHP] just a newbie in php, don't get mad

2001-03-26 Thread Philip Olson
com/zend/tut/using-strings.php Good luck! Regards, Philip Olson http://www.cornado.com/ On Mon, 26 Mar 2001, Martin Mark wrote: > ok as you got it already i am a newbie in php > could anyone please please post me what programs do I need or which could help me to >make some php stuff

RE: [PHP] setting Check box

2001-03-26 Thread Philip Olson
Use that code, $avail just isn't evaluating to 'n' so try this somewhere above it : $avail = 'n'; And it will be checked otherwise it won't. And btw, you tried setting value="n" that won't work unless this script submits to itself AND the user checks it before submitting so it'll remain chec

Re: [PHP] Is it possible?

2001-03-26 Thread Philip Olson
what setup do you have? assuming mysql and just starting out : learn a few basics : http://devshed.com/Server_Side/PHP/PHP101_1/ (part 1 of 5) know about strings : http://www.zend.com/zend/tut/using-strings.php nail down some sql : http://www.sqlcourse.com/ interact thy mysql : htt

Re: [PHP] Help: How do you get rid of these warnings for undefinedvariable s?

2001-03-27 Thread Philip Olson
hi anyangwe, either define the variables or do what most people do and turn down error reporting. see : Reporting Errors: - http://www.php.net/manual/en/phpdevel-errors.php pay special

Re: [PHP] search safe URLs

2001-03-27 Thread Philip Olson
Check out this post : http://marc.theaimsgroup.com/?l=php-general&m=98555149708325 The first two tutorials should help. Btw, no reconfigurations are required. Regards, Philip On Tue, 27 Mar 2001, Joe Sheble aka Wizaerd wrote: > In order to use URLs without ? and &, there has to be some r

Re: [PHP] form and php

2001-03-27 Thread Philip Olson
php-general&m=97513765915454&w=2 It's a very lengthy thread :-) regards, Philip Olson http://www.cornado.com/ On Tue, 27 Mar 2001, Augusto Cesar Castoldi wrote: > I had a form with just with one button, the action is a PHP file. And when > I hit "enter" the button (

Re: [PHP] Environment extract

2001-03-27 Thread Philip Olson
Ahh, that's the cause. Here's how to duplicate the error :-) error_reporting(E_NOTICE); foo(); function foo() { echo $HTTP_USER_AGENT; } As Mark mentioned, mind your scope. Regarding the error, I just posted some information on this perhaps it'll be of some use : http://mar

Re: [PHP] Spacing between $row["City"],$row["State"]

2001-03-27 Thread Philip Olson
Hi Mike, Try this little test : 'Seattle', 'state' => 'Washington'); // Can do in PHP4 : print "{$row['city']} {$row['state']}"; // Can do anytime : print $row['city'] . ' ' . $row['state']; ?> Not sure when "{$array['index']}" came about exactly but iirc it's not

Re: [PHP] $myfile[$count]_type?!

2001-03-27 Thread Philip Olson
Try this example : Regards, Philip On Wed, 28 Mar 2001, FredrikAT wrote: > Hi, again! > > Didn't work... > > This is the scene: (file.php?a=input) > > > (file.php?a=reg) > Trying to echo type... > ${$myfile[$count] . '_type'} // NOT WORKIN' > ${$myfile$count}_type // NOT WORKIN' > > A

Re: [PHP] Curious

2001-03-27 Thread Philip Olson
> I am curious to know why you need to use the /n, and what it actually does, > because I had a page that used them, and i removed them all and it still > works fine. Have a look here (the main manual is down this second) : http://uk.php.net/manual/en/language.types.string.php An example use

[PHP] HOWTO: arrays with forms

2001-03-27 Thread Philip Olson
-- HOWTO : Information on using arrays with forms (part 1 of n): -- A few array/form questions have popped up recently so here begins a HOWT

Re: [PHP] alternate pattern match

2001-03-28 Thread Philip Olson
> How do i extract the position (integer counting from the left) > of the letter M (beginning 'MSIE'. > $str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; This should do it : An article that uses regular expressions to deal with this browser detection hoopla can be seen here :

RE: [PHP] This PHP list

2001-03-29 Thread Philip Olson
> I wouldn't expect a programmer to walk in off the street and try to do > graphic design without having any concept of graphic design. ack! i do this very thing! one reason i rely on css and tables rather then graphics, that and it means less hits on my server :-) regarding this thread, t

Re: [PHP] Pattern Replacing

2001-03-29 Thread Philip Olson
Also consider something like : The idea behind it is similar to this : Info to know : strrpos() : Find position of last occurrence of a char in a string strpos() : Find position of first occurrence of a char in a string Looks like you found substr() , it helps out for these sorts

Re: [PHP] PHP and .htaccess

2001-03-29 Thread Philip Olson
this tutorial may help : http://zend.com/zend/tut/authentication.php regards, philip On Thu, 29 Mar 2001, Les Neste wrote: > Hi all, > > We're all familiar with the skanky little box the web browser pops up to > get your username/password in response to a 401 from the web server. What > I

Re: [PHP] weird isset problem

2001-03-29 Thread Philip Olson
What are you wanting to print? Here's a set of examples that may help understand what's happening with your code. In short, isset() is not being used properly. // if $var is set, this will return 1. if not set then it will return 0. // essentially, you don't want to print this directly as you'

Re: [PHP] Print or Echo.

2001-04-06 Thread Philip Olson
See this faq : What is the difference between echo and print? --- http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 regards, philip On Fri, 6 Apr 2001, Sterling wrote: > H- > > Just a quick question. > > Is there any di

Re: [PHP] Re: equivalent of asp's <%= strTest %>

2001-04-07 Thread Philip Olson
PHP does have an equivelent, as shown by Shaun : Things to keep in mind : 1. Is PHP4+ specific 2. Won't work if short_open_tag setting is off (in php.ini) - One reason to turn this off, to enable XML support 3. Doesn't follow up-and-coming PEAR coding standards And as you've see

Re: [PHP] Re: equivalent of asp's <%= strTest %>

2001-04-07 Thread Philip Olson
it's been so long in coming, and people are deferring to it before it's a reality. > > At least, that's the impression that I get. > > > > Philip Olson wrote: > > > > > 1. Is PHP4+ specific > > 2. Won't work if short_open_tag se

RE: [PHP] Char Problem

2001-04-07 Thread Philip Olson
> On my server I cant change anything on the php.ini is there any way how > to solve this problem in the code? No. This setting cannot be set within the script but can be with .htaccess with the following : php_flag magic_quotes_gpc off And be sure to have a look here (see user comments

Re: [PHP] PEAR Standards (was Re: equivalent of asp's <%= strTest%>)

2001-04-07 Thread Philip Olson
> "shaun" <[EMAIL PROTECTED]> wrote : > I'm pretty sure you can make php use the asp style % though too, not > sure if that's for short tags, regular tags or both, I know it's in > the config though, anyone know? Info related to the above can be seen here : http://www.php.net/manual/en/langua

Re: [PHP] Wrapping Text

2001-04-07 Thread Philip Olson
Or better yet, use nl2br() : http://www.php.net/manual/en/function.nl2br.php Regarding the html WRAP attribute, this little tutorial looks interesting : http://www.web-wise-wizard.com/html-tutorials/ html-form-forms-textarea-wrap.html (note: it's one link, had to

Re: [PHP] Redirect

2001-04-08 Thread Philip Olson
have a look at the first example found here : http://www.php.net/manual/en/function.header.php also check out meta refresh : http://www.pageresource.com/html/metref.htm regards, philip On Sun, 8 Apr 2001, Fernando Buitrago wrote: > Hi. > > Tell me te instruction to redirect (link) mi pa

Re: [PHP] newbie question about variables

2001-04-08 Thread Philip Olson
Something like the following HTML : And in foo.php have : print $var; // 1 or 2 or 3 Also consider the following : To have it load the current page rather then foo.php. regards, philip On Mon, 9 Apr 2001, Victor wrote: > Hello, > > Is there any (easy) way to let a user t

Re: [PHP] where might I find a good php page

2001-04-08 Thread Philip Olson
Here are some links : Most important, the PHP Manual : http://www.php.net/manual/ Some basic PHP Tutorials :

Re: [PHP] parse error

2001-04-08 Thread Philip Olson
Three questions : 1. What is the parse error. 2. What line corresponds with the parse error. 3. What are the two lines above the line in #2 Regarding your code, it works (no parse error) for me. Two possible issues/guesses/warnings are : a. Foreach is php4+ (see manual for alternatives

Re: [PHP] This loop is screwed up totally. Why o why o why....

2001-04-08 Thread Philip Olson
What does this do? > $specs = $myrow['features']; print $specs; > $features = explode('|',$specs); //What the feild is delimited by '|' print_r($features); Does it include the missing last value within the $features array? Does $specs look okay? Regards, Philip -- PHP General Mailing

Re: [PHP] @ at the begining

2001-04-09 Thread Philip Olson
Hi Fernando, Have a look here : http://www.php.net/manual/en/features.error-handling.php http://www.php.net/manual/en/language.operators.errorcontrol.php regards, philip On Mon, 9 Apr 2001, Fernando Buitrago wrote: > Hi. > > Please, what is the @ caracter in this case? > > @$var. > > W

Re: [PHP] apostrophe checks

2001-04-09 Thread Philip Olson
Hello Wade, What's so bad about apostrophes and what are the other "bad characters" you're referring to? Have you seen addslashes(), stripslashes() and magic_quotes_gpc? As well as strip_tags() and htmlentities(). Regarding replacing characters, have a look at str_replace() as well as regex f

Re: [PHP] how to search the list's archives?

2001-04-09 Thread Philip Olson
Quite a few resources are available, I usually go through marc : http://marc.theaimsgroup.com/?l=php-general Also, news.php.net has it all and several other archives exist. Since the archives are so valuable, consider following the php tips section : http://www.php.net/tips.php And create

Re: [PHP] Finer points of debugging: vardump vs. print_r

2001-04-09 Thread Philip Olson
> which is better for debugging -- vardump( ) or print( ) ? > > Does anyone have a preference? Why? Is one better than the other? > Thanks for answering this prickly question! > > John Lim > > > > -- > PHP General Mailing List (http://www.php.net/) > To u

RE: [PHP] L?

2001-04-09 Thread Philip Olson
You may want to look at class : Numbers_Roman which can be viewed here : http://cvs.php.net/viewcvs.cgi/php4/pear/Numbers/Roman.php regards, philip On Tue, 10 Apr 2001, Opec Kemp ( Ozemail ) wrote: > Try this site > > http://www.cod.edu/people/faculty/lawrence/romaindx.htm > > > > > -

Re: [PHP] & PHP

2001-04-09 Thread Philip Olson
> @ 8:13:49 PM on 4/9/2001, Gary wrote: > > ... > > I was afraid it would turn out like that. I hope our host will > > disable the short tags for us. > I'm not sure, but you may be able to specify that in an .htaccess > file. Check the docs on that (maybe search for htaccess). Yes it can, lik

Re: [PHP] while loop

2001-04-09 Thread Philip Olson
What does this do : '; } } else { echo ' no result '. mysql_error(); } ?> Regards, Philip On Tue, 10 Apr 2001, Jacky@lilst wrote: > Here I got this script: > > $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' ORDER > BY start_date ASC"; > $resultofr

Re: [PHP] Commercial sites that use PHP

2001-04-10 Thread Philip Olson
This looks like an old copy of sites.php : http://www.phpinfo.com/sites.php Btw, why has the following been removed? http://www.php.net/sites.php To difficult to maintain I suppose. At any rate, you'll find some good examples. Regards, Philip On Tue, 10 Apr 2001, Phil Labonte wrote: >

Re: [PHP] Commercial sites that use PHP

2001-04-10 Thread Philip Olson
A few methods to find such info : Netcraft : http://uptime.netcraft.com/up/graph/?host=www.php.net Tells us : The site www.php.net is runnin

RE: Re[2]: [PHP] foreach vs. while(list() = each())

2001-04-12 Thread Philip Olson
From Changelog : http://php.net/ChangeLog-4.php Version 4.0.2 29-Aug-2000 Fixed problem with nested foreach()'s. (Andi, Zend Engine) Just tested the below example code with 4.0.1 and 4.0.3 and above changed fixed it. regards, philip On Thu, 12 Apr 2001, Tim Ward wrote: > not for

Re: [PHP] Need HOWTO on field-update code.

2001-04-12 Thread Philip Olson
Check out these two tutorials, might help: chainedSelectors: A Better Way to Drop-down a PHP List : http://zend.com/zend/tut/drop-down.php Loading JavaScript Arrays with MySQL Data : --

Re: [PHP] Developing new PHP modules

2001-04-13 Thread Philip Olson
Some potentially useful links : Zend API Documentation : - http://www.zend.com/zend/api.php Extending PHP : -

RE: [PHP] email forms

2001-06-19 Thread Philip Olson
On Tue, 19 Jun 2001, Jason Murray wrote: > Hi tim, > > Change this: > > > mail($toaddress, $subject, $mailcontent, $fromaddress); > > mail ($toaddress, $subject, $mailcontent, > "From: Real Name <$fromaddress>\nReply-to: $fromaddress\n"); Yeah, notice where you'll be adding various

Re: [PHP] Code check please

2001-06-21 Thread Philip Olson
You want mysql_error(), call it somewhere after your query. echo mysql_error(); Regarding the query, the following should work just fine : $sql = "INSERT INTO tablefoo (a,b,c) VALUES ('$a','$b','$c')"; Be sure to add slashes sometime to your values beforehand. Anyway, mysql_error() is what

Re: [PHP] Making a string title case ?

2001-06-24 Thread Philip Olson
And if you want : $str = 'This is a STRING!'; To turn into: $str = 'This Is A String!'; Then do : $str = ucwords(strtolower($str)); Regards, Philip On Sat, 23 Jun 2001, Data Driven Design wrote: > Use the ucwords() function > > http://www.php.net/manual/en/function.ucwo

Re: [PHP] Remove value from array

2001-06-25 Thread Philip Olson
Here's an example : a [2] => c $bar = array('a','b','c'); $piece = array_splice ($bar, 1 ,1); print_r($piece); // [0] => b print_r($bar);// [0] => a [1] => c ?> http://www.php.net/manual/function.array-splice.php regards, philip On Mon, 25 Jun 2001, Bret R.

Re: [PHP] date -> day

2001-06-25 Thread Philip Olson
mktime can be pretty useful : $year = 2001; $month = 6; $day = 1; print date('l',mktime(0,0,0,$month,$day,$year)); as it creates a unix timestamp, and date() appreciates that. Regards, Philip On Mon, 25 Jun 2001, Tyler Longren wrote: > Hello, > > I have something like this: >

Re: [PHP] Enter to BR

2001-06-26 Thread Philip Olson
-forms-textarea-wrap.html Next, learn a little about linefeed / newline here : http://www.faqts.com/knowledge_base/view.phtml/aid/901/ And from there, getting 's from \n's is a snap, check out : http://www.php.net/manual/function.nl2br.php It's up to you from there :-)

Re: [PHP] irc bot?

2001-06-26 Thread Philip Olson
Haven't tried it but here's a php bot, which uses mysql : http://www.sourceforge.net/projects/phpegg/ regards, philip On Tue, 26 Jun 2001, Michael Roark wrote: > Does anyone know of the existance of an irc bot written in php or > otherwise, which will talk to a mysql database? > > > --

Re: [PHP] Filtering out \ when a ' is user entered?

2001-06-27 Thread Philip Olson
Most likely the cause of this is the magic_quotes_gpc setting in your (either maintained by you, or your hosts) php configurations, which are contained within php.ini Information on this setting can be read about here : http://php.net/manual/configuration.php#ini.magic-quotes-gpc In short, yo

Re: [PHP] Basic fopen() question

2001-07-04 Thread Philip Olson
Normally when I'm looking for a function I start at a given spot, for example, you've found yourself here : http://www.php.net/manual/en/function.fopen.php >From there, a good place to go is the given section, which in this case is here : http://www.php.net/manual/en/ref.filesystem.php Whi

Re: [PHP] ? : where in the manual?

2001-07-10 Thread Philip Olson
These are called (well, one name for it), is ternary operator. It's not PHP specific and a search on google will find some results. Regarding PHP, brief discussion (with examples) can be found at the following locations : http://www.php.net/manual/language.expressions.php http://www.php.net/m

RE: [PHP] weird behaviour with ("Z" <= "Z")

2001-07-10 Thread Philip Olson
I forget which version of PHP allows you to do the following, it may be 4.0.6 or maybe 4.0.7 : for ($a='a'; $a<='z'; $a++) { print $a; } The way I get around this is by : $letter = 'a'; for ($a=1; $a<=26; $a++) { print $letter++; } It works or at least may easily work for y

Re: [PHP] Line by Line , Word by Word

2001-07-10 Thread Philip Olson
In short : file() opens the file line-by-line and you can explode() each line via a space ' ' although not perfect, it could work for you. See manual for details. Regards, Philip On Tue, 10 Jul 2001, alfareees alfareees wrote: > How to read file line by line and read line word by word > >

RE: [PHP] Undefined index?

2001-07-11 Thread Philip Olson
If one has : $arr = array('a','b','c'); And calls upon the following : $arr[b] (as opposed to $arr['b']) Then the following will result : Warning: Use of undefined constant b - assumed 'b' in ./tmp.php on line 13 Warning: Undefined index: b in ./tmp.php on line 13 Always use quotes ar

[PHP] Re: d (ignore)

2001-07-19 Thread Philip Olson
sorry, testing news with a list I also subscribe too. php rules :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Re: I AM AT THE START POINT

2001-07-19 Thread Philip Olson
dly web hosts : http://www.faqts.com/knowledge_base/view.phtml/aid/4058/fid/27 Better yet, find one that costs money : http://hosts.php.net/ That should get you started :-) Regards, Philip Olson http://www.cornado.com/ be outside the box. Ali Y

[PHP] Re: array question

2001-07-19 Thread Philip Olson
Simple change : mysql_fetch_object to : mysql_fetch_array or mysql_fetch_row By default, mysql_fetch_array will allow for : $row[2] and $row['fieldname'] And mysql_fetch_row will allow for : $row[2] And as you know, mysql_fetch_object allows for : $row->fieldname

[PHP] Re: :(

2001-07-29 Thread Philip Olson
Define "not work" Some tips : 1. echo your query, make sure it appears as intended. In otherwords, make sure the variables $table and $category contain proper data. echo $sql; 2. make use of mysql_error() function as it can be useful. echo mysql_error(); For example, you may want

[PHP] Re: Free webspace with PHP&Mysql support

2001-07-29 Thread Philip Olson
See : http://www.faqts.com/knowledge_base/view.phtml/aid/4058/ This faq needs to be updated soon but should help regardless. If anyone has suggestions for this faq, please suggest or implement them. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [E

[PHP] Re: Get Operating System

2001-07-29 Thread Philip Olson
You may want to use the predefined constant PHP_OS as described here : PHP Manual : Predefined Constants http://www.php.net/manual/en/language.constants.predefined.php Regards, Philip Rainer Rosenberger wrote: > I tried to detect the Web-Servers operating system. Under Windows it's > e

[PHP] Re: Need for dox...

2001-07-30 Thread Philip Olson
Have a look here : "I'm new to sessions and cookies, where do I start?" http://www.faqts.com/knowledge_base/view.phtml/aid/6621 If anyone has useful words to add to this faq, please do so. Or post your suggestions here. Regards, Philip Gabriele Biondo wrote: > Hi... i would like to have

Re: [PHP] Making graphs from within PHP?

2001-07-30 Thread Philip Olson
This faq may help : "Is there a PHP library for drawing graphs?": - http://www.faqts.com/knowledge_base/view.phtml/aid/228/fid/2 Also, I'd have a look here : PHP : Scripts and Programs : Graphs a

[PHP] Re: whats wrong?

2001-07-31 Thread Philip Olson
Read this : Using Strings : - http://www.zend.com/zend/tut/using-strings.php Notice : echo "This will give a "parse error" to us"; echo "This will not give a \"parse error\" to us"; echo "This won't either

Re: [PHP] Make a mailing list

2001-07-31 Thread Philip Olson
I disagree with this post. A simple sentence or two would have been much more useful then a slandering reply. Regarding the question, here's a simple example : mail('[EMAIL PROTECTED]','subject','message','From: [EMAIL PROTECTED]'); More can be found here : http://php.net/manual/en/funct

RE: [PHP] FAQ

2001-07-31 Thread Philip Olson
A PHP faq resource : http://php.faqts.com/ Regarding an "official" faq, searching the archives works pretty well. Here's a great place to start (one of many places php-general is archived) : http://marc.theaimsgroup.com/?l=php-general Or actually, google archives everything forever : h

Re: [PHP] references... found it

2001-07-31 Thread Philip Olson
Just for the sake of completing this thread, variable functions can be read about here : http://www.php.net/manual/en/functions.variable-functions.php Regards, Philip On Tue, 31 Jul 2001, scott [gts] wrote: > im sorry, but i was trying to do that the hard > way. i figured out how to execut

Re: [PHP] dumb mysql_connect issue

2001-07-31 Thread Philip Olson
Try putting mysql_error() in your die statements so : or die(mysql_error()); and see what it tells you. Regards, Philip On Tue, 31 Jul 2001, CGI GUY wrote: > Is there anything (add. parameters, etc.) that I'm > missing that would possibly explain why the following > code won't execute? >

Re: [PHP] Re: include_once vs require_once

2001-07-31 Thread Philip Olson
Yes, this is essentially true. Zeev posted this to the list awhile ago, see the following : http://www.faqts.com/knowledge_base/view.phtml/aid/6/ Essentially the difference now is the type of error that's produced, one being a warning (include) while the other being FATAL! (require). Regards

Re: [PHP] Re: FAQ

2001-08-01 Thread Philip Olson
This question is answered here : http://php.net/manual/en/preface.php http://www.php.net/manual/en/introduction.php FAQ's are nice but the manual is even better :) Although this FAQ may help, it's titled "What is PHP?" and contains links too. http://www.faqts.com/knowledge_base/view.phtm

Re: [PHP] env var

2001-08-01 Thread Philip Olson
See : http://www.php.net/manual/en/ref.session.php Note the use of $HTTP_SESSION_VARS within the examples, this may be what you're referring to. Regards, Philip On Wed, 1 Aug 2001, Jon Yaggie wrote: > is there not an array that saves all session variables? I just got > done looking for it

Re: [PHP] Fun Question - What if...

2001-08-01 Thread Philip Olson
Sometimes I walk outside and wonder why the sky is blue. On Wed, 1 Aug 2001, Michael J. Seely wrote: > HI FOLKS, > > Imagine you had a PC Laptop, PHP installed, and a Ricochet/Sierra > Wireless AirCard 400 - 128 kbps NIC card. > > What boom pow applications can you imagine setting up

<    1   2   3   4   5   6   7   >