[PHP] Simple RegEx to pull out content between 2 markers

2008-03-29 Thread Jon Bennett
elds. Any help greatly appreciated. I'm certain this is a cinch for people who use regex often. Thanks, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sorting multi array

2007-04-25 Thread Jon Bennett
[name] => Havaianas Margaridas Yellow [size] => 5 (37/38) [quantity] => 1 ) [2552] => Array ( [name] => Havaianas Flash White [size] => 5 (37/38) [quantity] => 1 ) ) I need to keep the indexes if poss. Many th

Re: [PHP] Nested PHP

2004-02-02 Thread Jon Bennett
you can also do stuff like this... if ($someVar == true) { ?> someVar appears to be true someVar appears to be false Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester

Re: [PHP] Googlebot

2004-01-28 Thread Jon Bennett
is that it tends to avoid or downgrade URI's with parameters tacked onto the end. Does that go for internal links in your site then ??? news.php?start=10 etc ??? Could be tricky writing dyamic pages then. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media cre

Re: [PHP] Googlebot

2004-01-28 Thread Jon Bennett
clude: pdf, asp, jsp, hdml, shtml, xml, cfm, doc, xls, ppt, rtf, wks, lwp, wri. I notice php is not mentioned in this list, surely it can index php generated pages ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J

Re: [PHP] Function for crypt and decript.

2004-01-26 Thread Jon Bennett
http://uk.php.net/md5 Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 23 Jan 2004, at 09:55

Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Jon Bennett
you might want to check out http://www.flash-remoting.com/ as well. There's also a book from oreilly. Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge,

Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Jon Bennett
tp://amfphp.org/ Good luck, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 21 Jan 2004, at 13:52, Don

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
nice one, solves my next problem as well if any elements are empty! Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w

Re: [PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi Ben, Sorry, it does work - so I can safely say you can concat the name of a associ array :-) Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
elements whilst trying to fix it but hadn't gone back to the very begining in my browser so my loop was looking for the wrong post names! Doh! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n .

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi, Sorry for the double post, meant to say 'but nothing appears to be added to the array' not the db! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbrid

[PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
db, how can I access the $_POST vars within a loop ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.

Re: [PHP] Non American strtotime

2004-01-16 Thread Jon Bennett
Date = split ("/", $sDate); $return = $aDate[1]."/".$aDate[0]."/".$aDate[2]; return $return; } hth, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd,

Re: [PHP] best paractice example page creation php / mysql

2004-01-15 Thread Jon Bennett
NOW() )"; $i++ } And then repeat the 2 while loop for the table_items table. Is it ok to have INSERT statements enclosed in a while loop ??? Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

[PHP] best paractice example page creation php / mysql

2004-01-15 Thread Jon Bennett
table_item in one go ??? I could just have an examples table with say 10 list_item columns and 10 x 2 table columns but that seems like a short cut really and leaves no room for scaleability. Any thoughts ?? Thanks, Jon jon bennett | [EMAIL PROTECTED

Re: [PHP] convert date from UK to US for strtotime

2004-01-14 Thread Jon Bennett
ok, got it: // converts a UK date (DD-MM-YYY) to a US date (MM-DD-) and vice versa function convertDate ($sDate) { $aDate = split ("/", $sDate); $return = $aDate[1]."/".$aDate[0]."/".$aDate[2]; return $return; } Cheers, Jon jon bennett

[PHP] convert date from UK to US for strtotime

2004-01-14 Thread Jon Bennett
.$aDate[0]."/".$aDate[2]); return $return; } But this always fails, any idea why ?? What I really need is to re-order the string that a user inputs, say, 21/04/2004, so that it becomes 04/21/2004 so I can use strtotime. Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creat

Re: [PHP] how to determine if shopping cart has been abandoned?

2003-12-04 Thread Jon Bennett
why not only reduce the stock once a sale has gone through ??? Cheers, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
ries and a dynamic dropdown for the products in that category, that would be much easier to repeat. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wi

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
luck with google ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 4 Dec 2003

[PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
ll be a problem, what I see as a problem is how an admin will select 3 out of 200+ products. Obviously a drop down is a bad idea, but so would a alphabetical list. has anyone got any insight into the best way to solve this. Thanks, Jon jon bennett | [EMAIL PROTECTED] new media desig

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
hanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 4 Dec 2003, at 12:46, Richard Davey

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Jon Bennett
Hi, Why should I not use drop downs ?? are they generally out of favour now ?? why ??? I ask because I was thinking of having each categories products listed in a drop down ! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer

Re: [PHP] file uploads

2003-12-02 Thread Jon Bennett
false!"; } } Is there not a better way of handling this function chain (for want of a better word) ??? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd,

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
Down't worry, it's sorted! Cheers, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
sorry, made a mistake when writing my email: return = $aNewImage['new_name']; should be: return $aNewImage['new_name']; Cheers, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
$aNewImage['new_name'], or is it stuck in an array or something ?? Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
well I'll be dammed, that was it! Geeze, you look at something for so long sometimes you can't see the wood for the trees I feel so stoopid now! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
at! // doesn't work $aNewImage['image_loc'] = $aNewImage['image_dir'] . $aNewImage['new_name']; // does work!! $sImageLoc = '/Library/Webserver/Documents/wrox_site/_img/_products/' . $aNewImage['new_name']; Why oh why is that the case ??? Wou

Re: [PHP] Question on sending PhP variable results to an HTML page to be displayed.

2003-12-01 Thread Jon Bennett
Hi Al, I'd add a scrolling tag to your iFrame, as you won't ever need it to scroll. hth Thanks, Jon jon bennett | [EMAIL PROTECTED] new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbrid

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
27;s called: $this->storeBigImage($productID, $aArgs['Image']); All the image details are there because otherwise functions like getimagesize would fail, it just won't save the resized or, if the dimensions of the uploaded image aren't bigger than my max width and height, or

Re: [PHP] file uploads

2003-12-01 Thread Jon Bennett
e correct location move_uploaded_file($$_FILES["image"]["tmp_name"], BASE_DIR."/_img/_products/".$iProductId."_".$fileName); } The above works fine, which I find very strange indeed! Thanks, Jon jon be

[PHP] file uploads

2003-12-01 Thread Jon Bennett
eJpeg($aNewImage['new_image'], $aNewImage['image_loc']); ImageJpeg($aNewImage['original_image'], $aNewImage['image_loc']);          } else { // save original image //ImageJpeg($aImage['tmp_name'], $aNewImage['