[PHP] newbie needs quick help with formatting dates

2002-01-23 Thread Steven Jarvis
I'm pretty new to PHP, and I need to re-format some date data, but I can't figure out how to do it. This may be a doh! question, but I've looked through the manual, and I can't seem to find what I'm looking for. I have some dates formatted as mm/dd/yy that I need to convert to mmdd so I

[PHP] GetImageSize and iptcparse problems

2002-02-06 Thread Steven Jarvis
I've read the manual, and I'm still stuck, partially due to the manual itself. This is the first time I've dealt with this particular issue (parsing IPTC info from JPEGs). The example provided in the manual entry on GetImageSize: ?php $size = GetImageSize (testimg.jpg,$info); if

[PHP] escaping ?

2002-02-08 Thread Steven Jarvis
I'm trying to do some string replaces on XML files to import them into a prprietary db that doesn't understand XML. I need to strip the XML tags out of the file. However, when I use this line: $contents = str_replace('?xml version=1.0?', '', $contents); The ? in the string ends my php block.

Re: [PHP] Mac Classic and PHP...

2002-03-18 Thread Steven Jarvis
to administer as WebSTAR, but it's in some ways more flexible and more powerful. HTH, Steven -- Steven Jarvis Web Developer Arkansas Democrat-Gazette Northwest Edition -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] new $_SESSION variables vs. session_register/unregister

2002-03-28 Thread Steven Jarvis
getting started using sessions. The book I'm using to learn sessions isn't new enough to include how to deal with the new $_SESSION global variables array, and the manual's dire warning isn't explained thoroughly enough for me. Thanks! Steven -- Steven Jarvis Web Developer Arkansas Democrat

Re: [PHP] new $_SESSION variables vs. session_register/unregister

2002-03-28 Thread Steven Jarvis
variable and use unset() and isset() (in place of session_is_registered(). I apologize for the noise. Steven On Thursday, March 28, 2002, at 01:21 PM, Steven Jarvis wrote: The manual says: If you are using $HTTP_SESSION_VARS/$_SESSION, do not use session_register(), session_is_registered

[PHP] long PHP array and HTML forms question

2002-06-05 Thread Steven Jarvis
(say, if I set the values of that array manually in the php code). Any suggestions would be very helpful! Thanks, Steven -- Steven Jarvis Web Developer Arkansas Democrat-Gazette Northwest Edition -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] long PHP array and HTML forms question

2002-06-06 Thread Steven Jarvis
at this point to cut the empty entries foreach ($color as $key = $val) { if ($val) { $tmp[] = $val; } } $color = $tmp; That will remove empty values from $color. Ahh. That's exactly what I needed! Thanks, Steven Steven Jarvis Web Developer Arkansas Democrat-Gazette Northwest Edition

[PHP] storing an array in mysql - what's the best data type?

2002-07-08 Thread Steven Jarvis
'$bodycopy[0]/p\n; } Even with the version at the end there, I get A echoed to the screen. If I try a print_r($bodycopy), it says Array. Where did I screw up? Thanks! Steven -- Steven Jarvis Web Publishing Manager/Web Developer NWAnews.com: Arkansas Democrat-Gazette, Northwest Edition Northwest

Re: [PHP] storing an array in mysql - what's the best data type?

2002-07-09 Thread Steven Jarvis
the for loop. $headline, $byline and $bodycopy are variable names stored in the database? Yes. Sorry about that. I should have explained what those variables were. In any case, your solution worked for me. thanks! Steven -- Steven Jarvis Web Publishing Manager/Web Developer NWAnews.com

[PHP] Getting substring of text for first paragraph

2002-05-12 Thread Steven Jarvis
I want to do the following: Big chunk of text is stored in variable $a. Paragraph breaks are signalled by two line breaks. I want to just extract the first paragraph (i.e., all the text up to the first set of two line breaks) from $a. How would I do this? I tried exploding $a into an array,

[PHP] OT(?): mod_rewrite not passing GET variables to php

2003-10-01 Thread Steven Jarvis
I'm just starting to experiment with mod_rewrite on Apache 1.3.x and php 4.3.3. Register_globals is off. I have the following rules in my .htaccess file (which sits in the site's root dir along with paper.php): RewriteEngine On RewriteRule ^/([a-z]+)/([a-z]+)/$ paper.php?paper=$1section=$2 [L]

Re: [PHP] OT(?): mod_rewrite not passing GET variables to php

2003-10-03 Thread Steven Jarvis
On Wednesday, October 1, 2003, at 04:16 PM, Leif K-Brooks wrote: Steven Jarvis wrote: I'm just starting to experiment with mod_rewrite on Apache 1.3.x and php 4.3.3. Register_globals is off. I have the following rules in my .htaccess file (which sits in the site's root dir along