Re: [PHP] Good xml to array class?

2004-09-22 Thread Curt Zirzow
* Thus wrote Brent Clements: > I've done searching on google for "xml parsers" and xml to array using php and > honestly there are S many. Most of the classes I've taken a look at either > aren't finished, or require dom to work. > Converting xml to an array isn't an easy of a task. given:

Re: [PHP] opening table 2 inside table1

2004-09-22 Thread Curt Zirzow
* Thus wrote John Taylor-Johnston: > I want to open table 2 inside table1. See $sql2 below. I know this is illegal. what your doing is perfectly legal. > How can I work around this? Or can I? Lost cause? I'm not sure what kind of behaviour your getting but I'm going to blow through your code poi

Re: [PHP] Good xml to array class?

2004-09-22 Thread Greg Beaver
Yann LarrivÃe wrote: Go with SimleXML it's a PHP extention. Yann simplexml is PHP 5, and relies on libxml. If you don't have DOM, you don't have simplexml. Also, simplexml cannot be serialized in any form other than an xml string. If you wish to work with actual arrays (for instance, if you'r

Re: [PHP] Good xml to array class?

2004-09-22 Thread Yann Larrivée
Go with SimleXML it's a PHP extention. Yann On September 22, 2004 23:03, Brent Clements wrote: > I've done searching on google for "xml parsers" and xml to array using php > and honestly there are S many. Most of the classes I've taken a look at > either aren't finished, or require dom to wor

RE: [PHP] Secure SOAP connections

2004-09-22 Thread Yoed Anis
>From my experience some enterprise level systems do this. As long as you use https and a user/pass combo though I don't see what the problem is. You can always create a server-side login mechanism that will associate an id with the client and automaticaly expire after 30 minutes or so as well. Be

[PHP] Re: Good xml to array class?

2004-09-22 Thread Greg Beaver
Brent Clements wrote: I've done searching on google for "xml parsers" and xml to array using php and honestly there are S many. Most of the classes I've taken a look at either aren't finished, or require dom to work. Either I write my own or I get help from you guys. So me being the lazy pers

[PHP] Re: opening table 2 inside table1

2004-09-22 Thread John Taylor-Johnston
Maybe I should insert the contents of table2 into an array. Then in my while() I echo $participant[$mydata1->district] and $biography[$mydata1->district] If this is the best solution, how do I code it? John Taylor-Johnston wrote: > I want to open table 2 inside table1. See $sql2 below. I know th

Re: [PHP] Using '

2004-09-22 Thread John Taylor-Johnston
addslashes() > Juan Pablo Herrera wrote: > Escape it: \' > > It must be somewhere in the manual, I think. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using '

2004-09-22 Thread John Taylor-Johnston
addslashes($MY_HTML) might help? http://ca3.php.net/manual/en/function.addslashes.php John Jay Blanchard wrote: > [snip] > Hi! > i have: > $html = ' > >MY HTML > > '; > Inside of my html i used ', this produced a parse error, how can i > solved > it?.

[PHP] opening table 2 inside table1

2004-09-22 Thread John Taylor-Johnston
I want to open table 2 inside table1. See $sql2 below. I know this is illegal. How can I work around this? Or can I? Lost cause? John $myconnection = mysql_connect($server,$user,$pass); #mysql_select_db($db,$myconnection); #not necessary $sql1 = 'select * from '.$db.'.'.$table.' order by district,

[PHP] Good xml to array class?

2004-09-22 Thread Brent Clements
I've done searching on google for "xml parsers" and xml to array using php and honestly there are S many. Most of the classes I've taken a look at either aren't finished, or require dom to work. Either I write my own or I get help from you guys. So me being the lazy person that I am will as

Re: [PHP] Differences between echoing the output gradually or returning it.

2004-09-22 Thread Curt Zirzow
* Thus wrote Marek Kilimajer: > Eduard Duran i Rosich wrote: > >Hi, > >I just wanted to know what are the main pros and cons between echoing > >the output some PHP script as it process the data and returning the > >whole output to echo it at once. > >I find the second way to be useful when I want t

[PHP] FDF PDF and PHP

2004-09-22 Thread Anton Krall
Guys.. anybody working with pdf creation using php? I have a pdf form and what I need is to pass variables to it (I already did this and it creates the .fdf file and outputs to the browsers, acrobat opens up and shows the form populated) but how can I also save the resulting .pdf file on the server

[PHP] Errors from script running in CRON - MORE DETAILED INFO.

2004-09-22 Thread Pablo Gosse
Hi again folks. Thanks to those who helped in trying to find the cause of my problem this afternoon. Sorry if the code in this message wraps, but I'm writing this through a tss connection and damned if I can figure out how to change the wrap point in outlook :o( The CMS logged a new error a coup

Re: [PHP] Differences between echoing the output gradually or returning it.

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 22:10:07 +, Eduard Duran i Rosich <[EMAIL PROTECTED]> wrote: > I just wanted to know what are the main pros and cons between echoing > the output some PHP script as it process the data and returning the > whole output to echo it at once. > I find the second way to be useful

[PHP] Secure SOAP connections

2004-09-22 Thread Yann Larrivée
Hi, The subject says it all. I want to secure soap connection to my framework. How would you guys do it ? I tought of passing everything on a different port with a SSL connection + an key (sort of a PHP SESSION) that is given after a correct authentification (user, password) and expire after

Re: [PHP] Differences between echoing the output gradually or returning it.

2004-09-22 Thread Marek Kilimajer
Eduard Duran i Rosich wrote: Hi, I just wanted to know what are the main pros and cons between echoing the output some PHP script as it process the data and returning the whole output to echo it at once. I find the second way to be useful when I want to add a header() line without concerning former

[PHP] Differences between echoing the output gradually or returning it.

2004-09-22 Thread Eduard Duran i Rosich
Hi, I just wanted to know what are the main pros and cons between echoing the output some PHP script as it process the data and returning the whole output to echo it at once. I find the second way to be useful when I want to add a header() line without concerning former output. However, is that way

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Andrew Kreps
On Wed, 22 Sep 2004 14:13:37 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote: > 2. Add a new FAQ section on what information to collect when > troubleshooting PHP related problems and how this information can help you > find solutions as quickly as possible - including details on how to discern > whethe

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread -{ Rene Brehmer }-
At 22:43 22-09-2004, Greg Donald wrote: On Wed, 22 Sep 2004 15:31:09 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > php-db exists already. > [/snip] > > That's too general, don't you think? :7) I dunno, maybe. I ask my database questions on an actual database list if possible. I think

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Curt Zirzow
* Thus wrote Ed Lazor: > Here's are two ideas: > > 1. Add a section to the PHP mailing list page with information on where to > find official mailing lists for Apache, Javascript, and MySQL. Also add a > link to the FAQ section created in idea #2. This would be nice but if you look at the bulle

Re: [PHP] Cannot write data in session file

2004-09-22 Thread Marek Kilimajer
Bo Deng wrote: I just move the web pages from windows to linux. But the session variable doesn't work. And I found that in the \tmp directoy, it has sess_(MD5) file,but with empty contents,just 0 byte. BTW, I run a linux virtual host under IBM s390. the code works well in windows and other linu

Re: [PHP] menu mouseover using php and javascript

2004-09-22 Thread Marek Kilimajer
web_singer wrote: I am using an array to create a menu and the code to change an image on mouseover. I would also like to change some text on mouseover. While i can do it using a swtich in javascript it requires that I hard code all the different options in. My whole reason for using the php in t

RE: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Ed Lazor
Here's are two ideas: 1. Add a section to the PHP mailing list page with information on where to find official mailing lists for Apache, Javascript, and MySQL. Also add a link to the FAQ section created in idea #2. 2. Add a new FAQ section on what information to collect when troubleshooting PH

Re: [PHP] menu mouseover using php and javascript

2004-09-22 Thread John Nichel
web_singer wrote: Thanks for the response, I am very new to using PHP (really need a newbies section LOL) and while I can see how a multi-dimensional array would have been better than using two I am not sure how I would get my code to read that text in the mouseover. I can read the two arrays but

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
[snip] i just skimmed the errors, but it looked like various of them were likely due to database failure (i.e., the function didn't have the expected data to process). if something spotty is happening with your database connection that could give you these transient errors (assuming my underlyi

Re: [PHP] menu mouseover using php and javascript

2004-09-22 Thread web_singer
"John Nichel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > web_singer wrote: > > I am using an array to create a menu and the code to change an image on > > mouseover. > > I would also like to change some text on mouseover. While i can do it using > > a swtich in javascript it re

RE: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Matthew Sims
> [snip] >> No, list works just fine as it is with a mix of the new comer and > advanced >> users. No need to split in any way. > > I suggest adding another two lists (at least), one for mysql and one for > > javascript ;-) > [/snip] > > Three...Apache > > -- How about php-check-your-firewall --

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jason Wong
On Thursday 23 September 2004 04:27, Greg Donald wrote: > I don't think anyone would subscribe to php-js, except peeps with > questions. What do you mean php-js? Just a plain javascript only list, we don't want no stinkin' php stuff on a javascript list. What has php got to do with javascript?

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Chris Gregors
Typically problems with scripts failing to run from cron can be tracked back to environment variables. When you run it from the shell, you have the users env variables set. When it runs from cron, it (typically) has a slightly different environment. A simple way to test it is to get your shell

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 15:31:09 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > php-db exists already. > [/snip] > > That's too general, don't you think? :7) I dunno, maybe. I ask my database questions on an actual database list if possible. I think most people probably feel the same, I

[PHP] RE: Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Greg Beaver wrote: [snip] Does your crontab script use file locking to make sure that it isn't accessing a script at the same time as the webserver or another process? [/snip] Yes, I create a lock file when the script is called, but the only time I've ever seen a conflict there is when these pars

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 16:29:01 -0400, John Nichel <[EMAIL PROTECTED]> wrote: > Four...Just for flames. ;) My local Linux Users Group went the other way. They made a list serv just for n00bs. It has one rule only, no flames. -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Marek Kilimajer wrote: [snip] >>> Perhaps. Could the data being utilized by the code occasionally have >>> characters that should be escaped, by aren't? Are you escaping all >>> of the escapable characters, especially quotes, both single and >>> double? >> >> >> That's what I was thinking initia

Re: [PHP] menu mouseover using php and javascript

2004-09-22 Thread John Nichel
web_singer wrote: I am using an array to create a menu and the code to change an image on mouseover. I would also like to change some text on mouseover. While i can do it using a swtich in javascript it requires that I hard code all the different options in. My whole reason for using the php in t

RE: [PHP] menu mouseover using php and javascript

2004-09-22 Thread Jay Blanchard
[snip] Does anyone have an idea how I can get the text portion to also use my variable? [/snip] Output the javascript with PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Wed, 22 Sep 2004 15:26:01 -0500, Jay Blanchard <[EMAIL PROTECTED]> wrote: > Three...Apache php-install should cover that. I think php-oo would be nice however. -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

RE: [PHP] Cannot write data in session file

2004-09-22 Thread Chris Gregors
1. logon to the linux image. 2. determine the userid that the webserver runs as (for apache, look in httpd.conf) 3. su to that user 4. cd /tmp. 5. touch temp_file. If the touch works, then contact your sysadm If the touch doesn't work, contact your sysadm to grant write access to /tmp for the use

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jay Blanchard
[snip] On Thu, 23 Sep 2004 04:23:18 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > I suggest adding another two lists (at least), one for mysql and one for > javascript ;-) php-db exists already. [/snip] That's too general, don't you think? :7) -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread John Nichel
Jay Blanchard wrote: [snip] No, list works just fine as it is with a mix of the new comer and advanced users. No need to split in any way. I suggest adding another two lists (at least), one for mysql and one for javascript ;-) [/snip] Three...Apache Four...Just for flames. ;) -- John C. Nichel Übe

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Greg Donald
On Thu, 23 Sep 2004 04:23:18 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > I suggest adding another two lists (at least), one for mysql and one for > javascript ;-) php-db exists already. I don't think anyone would subscribe to php-js, except peeps with questions. -- Greg Donald http://gdcons

RE: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jay Blanchard
[snip] > No, list works just fine as it is with a mix of the new comer and advanced > users. No need to split in any way. I suggest adding another two lists (at least), one for mysql and one for javascript ;-) [/snip] Three...Apache -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Jason Wong
On Thursday 23 September 2004 03:41, Kevin Waterson wrote: > No, list works just fine as it is with a mix of the new comer and advanced > users. No need to split in any way. I suggest adding another two lists (at least), one for mysql and one for javascript ;-) -- Jason Wong -> Gremlins Associ

[PHP] Cannot write data in session file

2004-09-22 Thread Bo Deng
I just move the web pages from windows to linux. But the session variable doesn't work. And I found that in the \tmp directoy, it has sess_(MD5) file,but with empty contents,just 0 byte. BTW, I run a linux virtual host under IBM s390. the code works well in windows and other linux systems(no

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Curt Zirzow
* Thus wrote Curt Zirzow: > > $shortString = implode('', explode('', $string, $nth)); ignore this. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php, mySQL query character problem

2004-09-22 Thread Curt Zirzow
* Thus wrote Victor C.: > > If i copy paste the string into phpMyAdmin SQL, the query executes > successfully and returns one record. > > However, when I just do$returnValue = QueryDatabase($query); > echo > mysql_num_rows($ret

[PHP] Re: Strange errors when PHP script called from CRON

2004-09-22 Thread Greg Beaver
Pablo Gosse wrote: The script which is called by my crontab to start this process executes every minute, so I find it very strange that I'm getting these sporadic error messages. Can any one shed any light on this for me? Does your crontab script use file locking to make sure that it isn't accessi

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread Kevin Waterson
This one time, at band camp, raditha dissanayake <[EMAIL PROTECTED]> wrote: > I was refering to "is php-general too *general* for advanced php5 users" > not specifically at php 5. No, list works just fine as it is with a mix of the new comer and advanced users. No need to split in any way. Kev

Re: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Marek Kilimajer
Pablo Gosse wrote: Jay Blanchard wrote: [snip] Does anyone have any idea why I might be getting these errors? The code above, to me at least, doesn't look like it should be throwing parse errors. The script which is called by my crontab to start this process executes every minute, so I find it

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Jay Blanchard wrote: > [snip] > Does anyone have any idea why I might be getting these errors? The > code above, to me at least, doesn't look like it should be throwing > parse errors. > > The script which is called by my crontab to start this process > executes every minute, so I find it very

RE: [PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Jay Blanchard
[snip] Does anyone have any idea why I might be getting these errors? The code above, to me at least, doesn't look like it should be throwing parse errors. The script which is called by my crontab to start this process executes every minute, so I find it very strange that I'm getting these sporad

[PHP] Strange errors when PHP script called from CRON

2004-09-22 Thread Pablo Gosse
Hi folks. I've written a CMS where I work, the publishing guts of which is executed through a php script called from my crontab every minute. Every so often (it's happened roughly 17 times since July 22) I get parse errors in my log file when the scripts run into errors while executing. This is

RE: [PHP] php, mySQL query character problem

2004-09-22 Thread Jay Blanchard
[snip] $query = "select * from table1 where colum1 like '$email%'"; $returnValue = QueryDatabase($query); echo mysql_num_rows($returnValue); I always get 0 for the # of records. [/snip] You have not included the code from your QueryDatabas

[PHP] php, mySQL query character problem

2004-09-22 Thread Victor C.
Hi, I have a query to mysql basically saying: $query = "select * from table1 where colum1 like '$email%'"; //where $email is defined string. When i "echo $query", I get the string : select * from table 1 where colum1 like 'testdata%' If i copy paste the string into phpMyAdmin SQL, t

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Curt Zirzow
* Thus wrote Janet Valade: > Brian Dunning wrote: > > >Thanks Chris, that works great, but it's not doing what I want. I'm just > >trying to get the position of the 3rd occurrence (for example) of > >''. So I'm looking for a function that will return the value 19, > >given the above example str

RE: [PHP] ASP guts needs help.

2004-09-22 Thread Daniel Purdy
[snip] On Wed, 22 Sep 2004 00:09:01 -0600, LW Ellis <[EMAIL PROTECTED]> wrote: > I'm new to php, but am familar with ASP. > I have this code to open and read a text file. > What I need is to take out the 'while' and present the data one line > at a time. I read up on fgetcsv, but we will be usin

Re: [PHP] inserting timestamp into mysql field

2004-09-22 Thread Andrew Kreps
On Wed, 22 Sep 2004 09:29:21 +0100, Chris Dowell <[EMAIL PROTECTED]> wrote: > That's not 100% correct > > If you have more than one TIMESTAMP field only the first (IIRC) will be > filled with the current time - other TIMESTAMP fields will only be filed > if you set them = NULL. > You're absolute

Re: [PHP] ASP guts needs help.

2004-09-22 Thread Andrew Kreps
On Wed, 22 Sep 2004 00:09:01 -0600, LW Ellis <[EMAIL PROTECTED]> wrote: > I'm new to php, but am familar with ASP. > I have this code to open and read a text file. > What I need is to take out the 'while' and present the data one line at a > time. > I read up on fgetcsv, but we will be using one te

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
I don't understand why explode won't work for you. The explode solution is working. Thanks very much to everyone who replied with so much great information! - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using '

2004-09-22 Thread Juan Pablo Herrera
Hi! I solved using adslashes in $html and replace ' with ". Thanks!! Regards! JP > Just remember to make sure that the closing EOD; is flush with the left > margin an that there are NO spaces and NO other characters to the left > of it or PHP will give you a PARSE error > > > On Wed, 22 Sep 20

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Janet Valade
Brian Dunning wrote: Thanks Chris, that works great, but it's not doing what I want. I'm just trying to get the position of the 3rd occurrence (for example) of ''. So I'm looking for a function that will return the value 19, given the above example string. From your first post, you just want to

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Robert Cummings
On Wed, 2004-09-22 at 12:31, Brian Dunning wrote: > > > $string = 'onetwothreefourfive'; > > $nthPos = 4; > > $tmpArr = explode( '', $string ); > > $nthString = $tmpArr[($nthPos - 1)]; > > ?> > > Thanks Chris, that works great, but it's not doing what I want. I'm > just trying to get the

Re: [PHP] Using '

2004-09-22 Thread GH
Just remember to make sure that the closing EOD; is flush with the left margin an that there are NO spaces and NO other characters to the left of it or PHP will give you a PARSE error On Wed, 22 Sep 2004 11:56:54 -0400, François Moreau <[EMAIL PROTECTED]> wrote: > Hi Juan, >You might consider

Re: [PHP] Using '

2004-09-22 Thread Marek Kilimajer
Juan Pablo Herrera wrote: Hi! i have: $html = ' MY HTML '; Inside of my html i used ', this produced a parse error, how can i solved it?. Escape it: \' It must be somewhere in the manual, I think. -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Silvio Porcellana
Hi if you want the *rest of the string from the nth *, I think 'preg_match_all' with PREG_OFFSET_CAPTURE can help you (see http://www.php.net/manual/en/function.preg-match-all.php) You could do something like: $string = "onetwothreefourfive"; $count = preg_match_all('/([^<]+)/', $string, $out, P

Re: [PHP] header("Location: ") problem

2004-09-22 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: hi, is there a way of setting a target property for header("Location: thanks.htm")? my form is in an iframe so when i hit submit, my php page redirects the user to thanks.htm but this is rendered within the iframe not in a fresh page. No, you have to use target in the form

Re: [PHP] header("Location: ") problem

2004-09-22 Thread John Nichel
[EMAIL PROTECTED] wrote: hi, is there a way of setting a target property for header("Location: thanks.htm")? No. Not in php. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] header("Location: ") problem

2004-09-22 Thread luke
hi, is there a way of setting a target property for header("Location: thanks.htm")? my form is in an iframe so when i hit submit, my php page redirects the user to thanks.htm but this is rendered within the iframe not in a fresh page. any ideas? thanks, luke. -- PHP General Mailing List (htt

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
twothreefourfive'; $nthPos = 4; $tmpArr = explode( '', $string ); $nthString = $tmpArr[($nthPos - 1)]; ?> Thanks Chris, that works great, but it's not doing what I want. I'm just trying to get the position of the 3rd occurrence (for example) of ''. So I'm looking for a function that will re

Re: [PHP] {Spam?} Re: [PHP] Anyone using SPL Iterators?

2004-09-22 Thread John Holmes
Curt Zirzow wrote: * Thus wrote John Holmes: A later example implements ArrayAccess and IteratorAggregate and then says you can use count($A), but it doesn't work for my tests. It always returns 1. That example i think is minor mistake. As noted in the example above you have to call pass ->getIt

RE: [PHP] simplexml and xpath

2004-09-22 Thread Matthew Sims
> So I've just recently fallen in love with simplexml. But from what I've > read, is it true that xpath doesn't really work properly? > > I'm using an XML file that has a section like this: > > > Title > Link > Desc Subject > 2004-09-20T18:15:00+00:00 > > > My sample of my PHP code is: > > $libr

Re: [PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Chris Boget
> I've been RTFMing for about an hour and I can't find a string function > to split haystack 'onetwothreefourfive' at the nth > occurrence of needle ''. strpos gives me the position of the first > needle, and strrpos gives me the position of the last needle. But I'm > looking for the position o

Re: [PHP] Using '

2004-09-22 Thread François Moreau
Hi Juan, You might consider using the Heredoc syntax, as presented here : http://www.php.net/manual/en/ language.types.string.php#language.types.string.syntax.heredoc Your code snippet would look like this and do exactly what you had intended : $html = << YOUR HTML

[PHP] RE: **[SPAM]** [PHP] Using '

2004-09-22 Thread Jay Blanchard
[snip] Hi! i have: $html = ' MY HTML '; Inside of my html i used ', this produced a parse error, how can i solved it?. [/snip] http://www.php.net/htmlentities -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

[PHP] Split haystack at nth occurrence of needle?

2004-09-22 Thread Brian Dunning
I've been RTFMing for about an hour and I can't find a string function to split haystack 'onetwothreefourfive' at the nth occurrence of needle ''. strpos gives me the position of the first needle, and strrpos gives me the position of the last needle. But I'm looking for the position of one of t

[PHP] Using '

2004-09-22 Thread Juan Pablo Herrera
Hi! i have: $html = ' MY HTML '; Inside of my html i used ', this produced a parse error, how can i solved it?. Regards, JP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Gerard Samuel
Marek Kilimajer wrote: Gerard Samuel wrote: Niklas Lampén wrote: It's wrong to think people here don't know how to code object oriented. You can do that with PHP4 too - and you should in many cases. In some time PHP4 will be old school and PHP5 will be the general one. In my oppinion, it's good

RE: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Yoed Anis
Luke, MySQL has a built in CONCAT function. This will concat two strings togther. In your example it would look like telephone_number = CONCAT('$telcode', '$telnumber') ... See the MySQL manual for more info on the concat function. Of course using this function will force the data to be a string.

Re: [PHP] implode errors if array empty

2004-09-22 Thread John Holmes
From: "Marek Kilimajer" <[EMAIL PROTECTED]> [EMAIL PROTECTED] wrote: resolved with if(empty()) - apologies. isset() is more apropriate as $enterprise is not defined at all, empty() will issue a notice. No it won't. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] implode errors if array empty

2004-09-22 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: resolved with if(empty()) - apologies. isset() is more apropriate as $enterprise is not defined at all, empty() will issue a notice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] choose upload folder

2004-09-22 Thread raditha dissanayake
Marek Kilimajer wrote: Joerg P wrote: I have to be more specific: I dont want the file, I want the folder. This happens on the client side, it has nothing to do with php. You could possibly do it with signed java applets or activex scripts. If I may be permitted a shameless plug, Rad Upload is an

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', addre

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Daniel Kullik
Daniel Kullik wrote: [EMAIL PROTECTED] wrote: here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',addres

Re: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread Mag
> > It's all in the manual... > > http://us4.php.net/manual/en/function.parse-url.php Hey John, Thanks, got it! -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-)

RE: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread Mag
Hey, Thanks Jay, I needed a starting point and after reading at the url you posted I think I need parse_url... Thanks, Mag --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > and gethostbyname is only displaying the ip if I > pass > it something like > www.google.com > > Any idea how i ca

Re: [PHP] Does PHP need another mailing list???

2004-09-22 Thread raditha dissanayake
Gerard Samuel wrote: Just wondering. With the advent of php5 with its OO capabilities, is php-general too *general* for advanced php5 users? This topic has been discussed at least once a month. Please refer to list archives. I wasn't aware of this. So I searched MARC using the terms "php5 mai

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread John Holmes
From: <[EMAIL PROTECTED]> $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', address_3='$address3', town=

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Daniel Kullik
[EMAIL PROTECTED] wrote: here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', addre

Re: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread John Nichel
Mag wrote: Hi again, Am having a bit of a problem here, basically I have a text box on my site where the visitor enters a url and I display that url's ip address...which as Eugeni kindly pointed out can be easily done with gethostbyname()...but the problem is the url entered at my site would be som

RE: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Jay Blanchard
[snip] telephone_number='$telcode.$telnumber', only the telcode gets inserted. [/snip] Concat them before placing into the query...(have you echo'd $telnumber to make sure it is not empty?) $wholeTelNumber = $telcode . $telnumber; echo $wholeTelNumber; telephone_number='$wholeTelNumber', -- PH

RE: [PHP] Get remote servers ip [part 2]

2004-09-22 Thread Jay Blanchard
[snip] and gethostbyname is only displaying the ip if I pass it something like www.google.com Any idea how i can "strip" the first 2 examples to get the format i can pass to gethostbyname() ? [/snip] Start here ... http://www.php.net/url -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread luke
here is the whole query: $query = "INSERT INTO inmarsat_comp SET date_added=NOW(), prefix='$prefix', firstname='$firstname', lastname='$lastname', job_title='$jobtitle', company_name='$company', no_of_employees='$employees',address_1='$address1',address_2='$address2', address_3='$address3', town='

RE: [PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Jay Blanchard
[snip] Reason why I say that, is because in my mind, OO (especially when combined with design patterns) is a higher language than plain vanilla php. [/snip] Replace PHP with C++ and you'll see how ridiculous this statement looks. It is as if you were pitting PROCEDURAL against OOP, which we know

RE: [PHP] how to concatenate php variables in mysql query

2004-09-22 Thread Jay Blanchard
[snip] telphone number =$telcode.$telnumber' but only the telcode gets written to the database. [/snip] There is not enough here to know for sure (I am betting this is part of a query), but if your code looks like the above you are missing a single quote after the =. Now, if you enclose the vari

Re: [PHP] Appended [PHP] Solved [PHP] ASP guy needs help.

2004-09-22 Thread Marek Kilimajer
LW Ellis wrote: LW Ellis wrote: Never mind... As usual, about the time you ask for help, the brain gets unstuck and you find the solution. You should post back with a solution (append SOLVED to your subject) so that it becomes part of the thread (and archived). This way, next time someone else

[PHP] Get remote servers ip [part 2]

2004-09-22 Thread Mag
Hi again, Am having a bit of a problem here, basically I have a text box on my site where the visitor enters a url and I display that url's ip address...which as Eugeni kindly pointed out can be easily done with gethostbyname()...but the problem is the url entered at my site would be something like

Re: [PHP] Re: Does PHP need another mailing list???

2004-09-22 Thread Marek Kilimajer
Gerard Samuel wrote: Niklas Lampén wrote: It's wrong to think people here don't know how to code object oriented. You can do that with PHP4 too - and you should in many cases. In some time PHP4 will be old school and PHP5 will be the general one. In my oppinion, it's good for not-OO ppl to see h

Re: [PHP] Get remote servers ip

2004-09-22 Thread Mag
gethostbyname() of course!!! Got it, I just forgot the function name. Thanks, Mag --- Eugeni Doljenko <[EMAIL PROTECTED]> wrote: > That's very simple. Use gethostbyname() function. > Look "LXVIII. Network > Functions" for more details. > > - Original Message - > From: "Mag" <[EMAIL

[PHP] Appended [PHP] Solved [PHP] ASP guy needs help.

2004-09-22 Thread LW Ellis
LW Ellis wrote: Never mind... As usual, about the time you ask for help, the brain gets unstuck and you find the solution. You should post back with a solution (append SOLVED to your subject) so that it becomes part of the thread (and archived). This way, next time someone else has a similar is

Re: [PHP] Get remote servers ip

2004-09-22 Thread Eugeni Doljenko
That's very simple. Use gethostbyname() function. Look "LXVIII. Network Functions" for more details. - Original Message - From: "Mag" <[EMAIL PROTECTED]> To: "php php" <[EMAIL PROTECTED]> Sent: Wednesday, September 22, 2004 3:47 PM Subject: [PHP] Get remote servers ip Hi, I have a text

  1   2   >