Re: [PHP] Re: fwrite/fclose troubles

2008-03-21 Thread Dave Goodchild
Why are you writing a logging class? Why not use error_log and enable error logging? On Fri, Mar 21, 2008 at 1:11 PM, Al [EMAIL PROTECTED] wrote: int file_put_contents ( string $filename, mixed $data [, int $flags [, resource $context]] ) This function is identical to calling fopen(),

Re: [PHP] PHP and #if

2008-03-14 Thread Dave Goodchild
in php you have a number of constructs that can be used to execute code (or not) based on certain conditions ie is_defined(). Not sure if the comparison with C holds true as C is compiled and PHP is interpreted. On Fri, Mar 14, 2008 at 6:34 PM, Eric Gorr [EMAIL PROTECTED] wrote: If you are

Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Dave Goodchild
Will you two pricks cut it out. How fucking tedious. On Wed, Mar 12, 2008 at 9:34 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Wed, 2008-03-12 at 22:26 +0100, Aschwin Wesselius wrote: Robert Cummings wrote: On Wed, 2008-03-12 at 16:11 -0500, Greg Donald wrote: On 3/12/08, Robert

Re: [PHP] Re: Why use session_register()?

2008-03-10 Thread Dave Goodchild
session_register is old school. RTFM. On Mon, Mar 10, 2008 at 4:26 PM, Al [EMAIL PROTECTED] wrote: Read the current php manual. Lamonte H wrote: Is it necessary to use session_register()? What exactly was the point of this function if you can set sessions using $_SESSION it self? --

Re: [PHP] Question about functions

2008-01-24 Thread Dave Goodchild
Methink you're a little confused. A function is a piece of code that performs a specific job that can be called. You may send it data, you may not. It may return data, it may not. If your link goes to logout.php, that script may use functions to do it's job. You can't call a function in a link as

Re: [PHP] Question about functions

2008-01-24 Thread Dave Goodchild
Said it was a crude example and I was pushed for time On Jan 24, 2008 8:13 PM, Eric Butera [EMAIL PROTECTED] wrote: On Jan 24, 2008 3:08 PM, Dave Goodchild [EMAIL PROTECTED] wrote: header(Location: index.php); Redirect uri's should be absolute.

Re: [PHP] More frustration with MySQL and PHP

2008-01-21 Thread Dave Goodchild
Don't be scared of functions, no magic or mystery there, all you are doing is putting your code in a function like so: function add($a, $b) { return $a + $b; } ..for example and calling it like so: $a = 12; $b = 100; $sum = add(12, 13); ...etc etc, not too much more to learn than that and now

Re: [PHP] http_request

2008-01-05 Thread Dave Goodchild
Also, supply an absolute URL when using header redirects. On Jan 5, 2008 3:44 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 5, 2008 9:06 AM, peeyush gulati [EMAIL PROTECTED] wrote: Greetings on New Year :) To you, as well! We have a script, say layer.php, which uses HTTP_REQUEST

Re: [PHP] http_request

2008-01-05 Thread Dave Goodchild
It's advisable as the page you will be redirected to will be relative to the one the browser actually requested, so it's a good habit to get into. On Jan 5, 2008 4:05 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Jan 5, 2008 10:59 AM, Dave Goodchild [EMAIL PROTECTED] wrote: Also, supply

Re: [PHP] best way for PHP page

2008-01-02 Thread Dave Goodchild
If MVC is too heavy for you it may also be worth exploring templating engines such as Smarty: http://www.smarty.net/ On Jan 2, 2008 4:10 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 2, 2008 2:17 AM, Alain Roger [EMAIL PROTECTED] wrote: Hi, i would like to improve my coding quality

Re: [PHP] First stupid post of the year.

2008-01-02 Thread Dave Goodchild
don't use nonbreaking spaces use CSS to style the input button then you wont have to deal with redundant presentational gunk in your data On 1/2/08, David Giragosian [EMAIL PROTECTED] wrote: On 1/2/08, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 2, 2008 1:34 PM, tedd [EMAIL PROTECTED]

Re: [PHP] Select Box CSS OT

2007-12-18 Thread Dave Goodchild
Why not try a css list? css-discuss for example? On Dec 18, 2007 8:06 PM, Børge Holen [EMAIL PROTECTED] wrote: On Tuesday 18 December 2007 20:03:53 Stut wrote: VamVan wrote: Please apologize for sending this question to PHP forums. If you know this already why ask the question here?

[PHP] Convertig xml into array

2007-11-27 Thread Dave Goodchild
Hi guys. I have the following XML file which I want to convert into a multidimensional array. I am using PHP5 so don't want to use SimpleXML as apparently there are issues with sessions and after conversion I want to pass this array into the session. Any ideas on the best and cleanest way to do

Re: [PHP] tell me :which book is good for newman??

2007-11-17 Thread Dave Goodchild
Start with Programming PHP and then get Upgrading To PHP5 (both by O'Reilly) On Nov 17, 2007 2:31 PM, David Giragosian [EMAIL PROTECTED] wrote: On 11/17/07, joychen [EMAIL PROTECTED] wrote: tell me :which book is good for newman?? You mean paul? -- PHP General Mailing List

Re: [PHP] Need a hint how to track an error

2007-11-12 Thread Dave Goodchild
Start by coding proper semantic xhtml and you will have less headaches too - that code looks very ugly. On Nov 12, 2007 8:38 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote: Chris wrote: Ronald Wiplinger wrote: My php program is working with Firefox, but not with Internet Explorer. Nothing

Re: [PHP] moving over to php 5

2007-10-29 Thread Dave Goodchild
Support for php4 will be dropped at the end of the year so hosts will be forced to make the upgrade at some point. On 10/29/07, Hulf [EMAIL PROTECTED] wrote: Hi, It is about time I made the jump to 5, however the only thing that is holding me back is the problem with hosts. How many hosts

Re: [PHP] Looking for a framework

2007-10-23 Thread Dave Goodchild
You mean a javscript library? If so, check out jquery and moo.fx. On 10/23/07, Merlin [EMAIL PROTECTED] wrote: Hi there, I am looking for a framework to integrate some AJAX Functionality into my PHP4 MySQL Apache webapp. First thing I would like to do, is an edit function that opens up a

Re: [PHP] Re: Form Data Filtering

2007-06-15 Thread Dave Goodchild
I use something like this: $_SESSION['profane'] = false; foreach ($_POST as $value) { foreach ($swearbox as $profanity) { if (preg_match(/$profanity/i, $value)) { $errors = true; $_SESSION['profane'] = true; mail(TECHEMAIL, 'profane content

Re: [PHP] Re: Form Data Filtering

2007-06-15 Thread Dave Goodchild
No, because extra processing is done on the other side - now

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Dave Goodchild
Unless some server config error causes that stuff to be output on the page? I tend to put such functions in a .inc file and amend the .htaccess to prevent download.

Re: [PHP] Re: any security problems with this?

2007-06-12 Thread Dave Goodchild
Sure, I usually put these files outside the docroot - unless I am in some f**ked-up hosting environment that doesn't let me change the include path...

Re: [PHP] file permissions

2007-06-09 Thread Dave Goodchild
Why not use umask?

Re: [PHP] Re: directories - again

2007-06-07 Thread Dave Goodchild
umask

Re: [PHP] Attempting to search a MySQL database from PHP not working

2007-05-31 Thread Dave Goodchild
Your problem is this: $result_row[] = mysql_query($query) or die(mysql_error()); ...you are assigning a query to a variable. What you need to do is something like this: $result = mysql_query($query) or die(mysql_error()); while ($result_row = mysql_fetch_array($result)) { . }

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Dave Goodchild
If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed?

Re: [PHP] Re: Tipos about which CMS use

2007-05-29 Thread Dave Goodchild
You could also try Drupal. Drupal 5 comes bundled with jQuery. Drupal is powerful and flexible and the community is large and supportive.

Re: [PHP] problem with string floats in PH

2007-05-15 Thread Dave Goodchild
What function(s) are you using to read the file contents? How are you inserting them into the array? Code examples please...

Re: [PHP] Do you use any framework in your applications?

2007-05-12 Thread Dave Goodchild
It's a personal thing. I use Code Igniter (codeigniter.com), which is fast, lightweight, has a great community and excellent documentation, as well as some very good video tutorials. It pales in comparison with Ruby On Rails, of course, but that's another thread on another list...

Re: [PHP] GET variable unexpectedly assigned to session variable

2007-05-10 Thread Dave Goodchild
Another small and unrelated point - you don't need to use double quotes inside the array brackets - you're not processing them at all.

Re: [PHP] Why does this encoding work in PHP?

2007-05-04 Thread Dave Goodchild
The characters are encoded in octal and the php interpreter converts them into the corresponding ASCII characters and then the sequence is represented as a string which is included?

Re: [PHP] Re: everything printed suddenly has blue text, as if were a link

2007-04-26 Thread Dave Goodchild
View the source, you have this: font color=blue which is not closed, therefore everything after it will be blue.

[PHP] IE and cookie issues in PHP app

2007-04-26 Thread Dave Goodchild
Hi all. I have built an online events directory in php ( http://dontjustsitthere.co.uk) where people can find local events and also post their events. The app is composed of a single page, index.php, that generates different content depending on the parameters passed to it and uses sessions for

Re: [PHP] ${}

2007-04-25 Thread Dave Goodchild
You can also use that in interpolations where the variable name may be ambiguous ie My name is Stephen and I am a {$type}drone ..or to interpolate array lookups: This is {$desc['mood']} don't you know!

Re: [PHP] CSS vs. Tables OT

2007-04-19 Thread Dave Goodchild
Can we kill this now please? It's not a php issue, is an old and endless argument and is better addressed on a css / design list.

Re: [PHP] Re: CSS vs. Tables OT

2007-04-18 Thread Dave Goodchild
Tables used for presentational layout are a hack, implemented in an albiet ingenious way to overcome the shortcomings of the Web quite a while ago now. Tables should be used for the display of tabular data, ie spreadsheets, calendars etc. Table layout increases download times, the deeper nested

Re: [PHP] redirect with header still not working

2007-04-17 Thread Dave Goodchild
Can you re-iterate what is happening - I have a site with 1and1 and use header() with no issues.

Re: [PHP] redirect with header still not working

2007-04-17 Thread Dave Goodchild
That is, unless you use output buffering. It may not be the most elegant solution (using header() to redirect users increases server calls), but I built a template-driven php site that calls: ?php ob_start; ? ...depending on certain conditions which means I can then use header() even after I

Re: [PHP] header('Location:') works locally but not remotely

2007-04-16 Thread Dave Goodchild
Provide some code...?

Re: [PHP] which CMS are you using and why?

2007-04-08 Thread Dave Goodchild
I have just upgraded to Drupal 5 and so far am very impressed - D5 comes bundled with the jquery library and I have found drupal to be very powerful with a wide and supportive community.

Re: [PHP] Question about form submitting

2007-04-03 Thread Dave Goodchild
Not true. You can submit the form back to itself as many times as required by making the form action $_SERVER['PHP_SELF'] and checking for various sequences and outputting different html in each case.

[PHP] Duplicate dates in array

2007-04-02 Thread Dave Goodchild
Hi all, I have an array containing a sequence of dates in the following format, for example: Mon 26 Nov 2007 Mon 24 Dec 2007 Mon 31 Dec 2007 Mon 28 Jan 2007 ...and I want to remove any the first element in cases where the Mondays fall in the same month, so in this case I want to be left with:

Re: [PHP] Duplicate dates in array

2007-04-02 Thread Dave Goodchild
Amazing, just what I needed - many thanks. Have been coding non-stop for 10 days and things are getting foggy. Grats for your informed and quick response and have a fantastic day!

Re: [PHP] What is wrong with this INSERT?

2007-03-29 Thread Dave Goodchild
Because of this: $sql = mysql_query(INSERT INTO tbl (WHEN, WHAT, WHO) VALUES ('$WHEN','$WHAT','$WHO')); $result = mysql_query($sql) or die(Fatal Error :.mysql_error()); ...you are running the query and assigning the results into $sql and then running mysql_query again in the line below. So

Re: [PHP] POST + QUERY

2007-03-27 Thread Dave Goodchild
use: $_POST['max_id'] == or even better: if (empty($_POST['max_id']))

Re: [PHP] POST + QUERY

2007-03-27 Thread Dave Goodchild
Because isset will return true if the variable is set, even if it is blank. Empty will return true is the variable holds an empty string.

Re: [PHP] image digit to check password

2007-03-21 Thread Dave Goodchild
Om On 3/20/07, Jochem Maas [EMAIL PROTECTED] wrote: Tijnema ! wrote: On 3/20/07, Dave Goodchild [EMAIL PROTECTED] wrote: Have a look at this: Have a look at nothing :) I believe this Dave's way of pointing people to the Great Void :-) -- PHP General Mailing List (http://www.php.net

Re: [PHP] image digit to check password

2007-03-20 Thread Dave Goodchild
Have a look at this: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: [PHP-WIN] Re: [PHP] Re: Question on virus/worms

2007-03-15 Thread Dave Goodchild
Turn off register_globals - if you pollute your scripts with global variables like that you are asking for trouble. If you can't make sure you clean the variable. Using include($page.php) is asking for trouble. If you can get register_globals switched off (it's off by default in PHP5 for this

Re: [PHP] Redirecting in a PHP script

2007-03-13 Thread Dave Goodchild
If you do want to use the header function after html has been output, you can always look at using output buffering (ob_start()).

Re: [PHP] Capitalizing the first letter

2007-03-13 Thread Dave Goodchild
ucwords(strtolower($string)) or ucfirst(strtolower($string)) On 3/13/07, Todd Cary [EMAIL PROTECTED] wrote: I would like to write a filter that takes the text smith or SMith and returns Smith; same for ralph smith. Is the a good source on using filters this way? Thank you... -- PHP

[PHP] Variable variables and references

2007-03-10 Thread Dave Goodchild
Hi guys, I have just read 'Programming PHP' (O'Reilly) and although I think it's a great book, I am confused about variable variables and references - not the mechanics, just where you would use them. The subject of variable variables is explained but no examples are given as to why and where

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Why not learn in a web environment if your goal is to build a website? Just create the following file: ?php phpinfo(); ? save it, upload it and view it. If you see the php details you have the system set up as you need it and can just start writing php-driven web pages (the file you are using

Re: [PHP] IE6 session issues

2007-02-28 Thread Dave Goodchild
OK. Blank entries means that as date is passed in and validated via forms, it is then entered into $_SESSION so data can be persistent as the user goes back and forth. These values are eventually entered into the database and are blank, whereas the few values that are entered from $_POST (ie

Re: [PHP] echo text - anti-spam-spider measure

2007-02-28 Thread Dave Goodchild
On 2/28/07, tedd [EMAIL PROTECTED] wrote: At 11:22 PM -0500 2/27/07, John Taylor-Johnston wrote: I need an anti-spam-spider measure for my site. Too many addresses are getting raked. In once instance, I created a flash page: http://erasethis.glquebec.org/English/contact.htm But I just don't

Re: [PHP] Populating array with function

2007-02-27 Thread Dave Goodchild
You have a typo in your code...

Re: [PHP] Re: how to display images stored in DB

2007-02-25 Thread Dave Goodchild
On 2/25/07, zerof [EMAIL PROTECTED] wrote: Alain Roger escreveu: Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- It is not a good practice

[PHP] IE6 session issues

2007-02-24 Thread Dave Goodchild
Hi all. I am running an online charity lottery and am having issues with IE6 and sessions. To fix them, I added the following at the top of each file: ini_set('session.name', 'tlc'); header(Cache-control: private); session_start(); ...ran a local test in IE6 worked fine, then noticed more

Re: [PHP] Check if link is on a page

2007-02-24 Thread Dave Goodchild
$web = fopen('http://google.com/index.php', 'r'); $contents = file_get_contents($web); if (preg_match('/$link/', $contents))... you got it simplified and no error checking but you get the idea.

Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dave Goodchild
On 2/24/07, Otto Wyss [EMAIL PROTECTED] wrote: With method=post just $kind works fine (register_global) yet I've also tried any combination of $_GET['kind'] and $_POST['kind']. With method=get it doesn't work. O. Wyss Peter Lauri wrote: How are you fetching the GET and POST? With $_GET and

Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dave Goodchild
On 2/24/07, Dotan Cohen [EMAIL PROTECTED] wrote: Also, if you're using the variable in a print string, then you'll need to exit the string, like so: $print Hello, $kind!; would become: $print Hello, .$_GET[kind].!; Dotan Cohen http://easyanswers.info http://nirot.com -- PHP General Mailing

Re: [PHP]Transform a block of code in PHP

2007-02-23 Thread Dave Goodchild
I assume you mean you want to hold that html in a variable? Use a heredoc.

Re: [PHP] Option Value

2007-02-23 Thread Dave Goodchild
Also, if you want to get into the habit of writing valid xhtml, use lowercase and selected=selected

Re: [PHP] Problems processing UNIX timestamps in events directory

2007-02-21 Thread Dave Goodchild
Thanks all for your input - you're all correct, I don't really need to use timestamps as I am only interested in dates so will be reworking the app to use dates only. I still need to generate sequences of dates and really don't want to deal with DST, so my question is: can I add days to dates

[PHP] Problems processing UNIX timestamps in events directory

2007-02-20 Thread Dave Goodchild
Hi all. I have an odd problem. I am building an events directory and when users search, they provide a date range ie Feb 16 2007 to March 12 2007 as one of the options for searching. The system then creates an array of timestamps from this and then polls the database for all events whose

Re: [PHP] Problems processing UNIX timestamps in events directory

2007-02-20 Thread Dave Goodchild
I AM using the logic you and Jochem suggest in the query, I am not performing any joins. I query for certain criteria re the start and end dates held in the database, and once I have my set I then work with it dynamically as I need to know, based on the event frequency, how many events from that

[PHP] Sorting a multidimensional array

2007-02-08 Thread Dave Goodchild
Hi all. I am building an online events directory and as part of the system users can search for events by date, category etc. The logic involved in finding events that match the user-entered dates works like so: 1. we create a range of dates from the start and end dates specified by the user 2.

Re: [PHP] Sorting a multidimensional array

2007-02-08 Thread Dave Goodchild
Thanks for that - can't do that as all I know in the database is the start and end date for each event (so I don't have to create mapping tables and perform massive joins), the rest is handle dynamically. I think I can do it using usort, this seems to work, any comments? function compare($x,

[PHP] Ongoing encoding issues

2007-01-26 Thread Dave Goodchild
Hi all, I posted a question a couple of days ago regarding a web app I have wherein users are able to indicated prices and concessions via a text field, and the resulting encoding issues I have experienced, the main one being seeing the pound sign as £ if viewing the results in a browser with

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Dave Goodchild
This is what I use: $site = (!preg_match('#^http://#', $_POST['c_site'])) ? raw_param(trim(strip_tags(http:\/\/ . $_POST['c_site']))) : raw_param(trim(strip_tags($_POST['c_site']))); don't worry about raw_param, that's a function of my own, but you get the idea.

Re: [PHP] Encoding issue with ?

2007-01-24 Thread Dave Goodchild
Thanks guys. The issue is that users can specify text as well as currency in the input field ie '£2 students / £5 general admission'.

Re: [PHP] no database selected

2007-01-23 Thread Dave Goodchild
mysql_select_db

[PHP] Encoding issue with £

2007-01-23 Thread Dave Goodchild
This may be more of a mysql issue, but I am using php for my app so here goes... I have a fee field in the database, and when users post events they can specify entrance fee in £. In some, not all, of the fields I am getting, for example, £7 rather than £. Is this an encoding issue? Many

Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Dave Goodchild
Why not check php.ini to see whether display_errors is set to off and switch it on until you are back in business? Check the httpd.conf file to make sure Apache is parsing .php files correctly.

Re: [PHP] newbie question regarding URL parameters

2007-01-09 Thread Dave Goodchild
Wow, there are some really bitchy, unattractive people here. No wonder some people bail out of IT. Don't confuse knowledge for wisdom. On 1/9/07, tedd [EMAIL PROTECTED] wrote: At 9:17 PM -0500 1/5/07, [EMAIL PROTECTED] wrote: You'll probably get 50 answers to this, but here's probably what

Re: [PHP] newbie question regarding URL parameters

2007-01-09 Thread Dave Goodchild
Read the reponses.

Re: [PHP] Uninitialized string offset: 0

2007-01-06 Thread Dave Goodchild
Can you show us what you're calling it with? Al Padley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.web-buddha.co.uk

Re: [PHP] Ensuring that variable contains a number

2006-12-07 Thread Dave Goodchild
is_numeric will return true for a positive or negative number.

Re: [PHP] Include problem

2006-12-06 Thread Dave Goodchild
Use ini_set or an .htaccess file - try the first, and if that doesn't work use an .htaccess file if you have them enabled in the server (and it's Apache of course!). On 12/6/06, Ashley Hales [EMAIL PROTECTED] wrote: I am trying to use includes on a free php server but I cannot set the

Re: [PHP] Re: Preg_match - Find URL and convert to lower case

2006-12-01 Thread Dave Goodchild
In that case you could use the /e trailing option to use strtolower on the subpattern.

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Dave Goodchild
Why not use strtolower on the string after the replacements have been made? -- http://www.web-buddha.co.uk

Re: [PHP] Maybe an HTML prob?

2006-11-29 Thread Dave Goodchild
Indeed. A good habit to get into to avoid that is the write it like this: if ('yes' == $Permission) that way, if you write = rather than == you catch the error On 11/29/06, Brad Fuller [EMAIL PROTECTED] wrote: if ($Permission = Yes) should be if ($Permission == Yes) It's one of those

[PHP] Detecting naughty sites

2006-11-28 Thread Dave Goodchild
Hi all. I am building a web app and as part of it advertisers can upload their ad image and website URL to go with their ad. Is there a good way to detect whether that site is a porn site via php? -- http://www.web-buddha.co.uk

Re: [PHP] security question

2006-11-23 Thread Dave Goodchild
There are a few ways of working you should adpot early as they protect against a range of security problems. Some examples: 1. Always initialised your variables. 2. If you can, turn off register_globals, or code defensively if you can't. 3. Always mistrust incoming data, validate, check contents

Re: [PHP] what settings I have to use in php 5.1.2?

2006-11-23 Thread Dave Goodchild
Also, turn off display_errors before going into production, at which stage enable error logging. On 11/23/06, Jochem Maas [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: hi! the company I work for moves our web server to other hosting company (dedicated server).

Re: [PHP] PHP Programmers

2006-11-18 Thread Dave Goodchild
I charge £20(approx $40) per hour or by the job, code in php, use mysql, and produce front end in xhtml/css. Recent example: dontjustsitthere.co.uk/stage/. On 11/18/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Does anyone know of a good website, which rates PHP programmers? or Does anyone

[PHP] Sorting multidimensional arrays

2006-11-16 Thread Dave Goodchild
Hi all. I have a multidimensional array here: array(6) { [0]= array(25) { [0]= string(1) 7 [eventid]= string(1) 7 [1]= string(2) 17 [cat_id]= string(2) 17 [2]= string(13) Tits And Bums [name]= string(13) Tits And Bums [3]= string(19) The Pleasure Centre [venue]= string(19) The Pleasure Centre

Re: [PHP] Sorting multidimensional arrays

2006-11-16 Thread Dave Goodchild
Result. Cheers! On 11/16/06, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2006-11-16 at 15:28 +, Dave Goodchild wrote: Hi all. I have a multidimensional array here: Bums [name]= string(13) Tits And Bums [3]= string(19) The Pleasure [--SNIP--] ...which comprises a set of returned

Re: [PHP] Looping through array

2006-11-16 Thread Dave Goodchild
If you know the array elements, you may not need to loop. Why not just echo the particular array elements i.e. td?php echo $array[2]; ?/td for example?

Re: [PHP] Re: Space in regex

2006-11-16 Thread Dave Goodchild
I ran this expression through Regex Coach: \[([A-Za-z0-9\'.-:underscore:\s]+)\|([A-Za-z0-9\'. -:underscore:]+)\] ...and it matched the patterns your describe.

Re: [PHP] CSS / PHP / Javascript

2006-11-15 Thread Dave Goodchild
Good responses here - I tend to use MS conditional comments as I only resort to hacks when there (seems) to be no other way, and although conditional comments are proprietary they are ignored as comments by other browsers and are hence pretty harmless. Yes, for example Opera identifies itself as

Re: [PHP] Regular expressions

2006-11-15 Thread Dave Goodchild
Is there a way to make a regular expression to match on a particular way the letters are arranged? For instance, if you had a word: THAT It could match on any word in the dictionary that had the form: 1231 preg_,match('/^(\w){1}\w\w\1$/'); would match the above on a single line for

Re: [PHP] cURL uses

2006-11-15 Thread Dave Goodchild
You would use cURL to achieve the things cURL is built to achieve?

Re: [PHP] Permanent Links - Blog

2006-11-08 Thread Dave Goodchild
Are you writing the blog from scratch? I think you will have to get to grips with mod_rewrite (Apache).

Re: [PHP] Frameworks

2006-11-02 Thread Dave Goodchild
I am using Code Igniter on two projects at the moment and I am loving it. All the tedious, repetitive elements are reduced, security is increased and code organised in a clean fashion (you can of course mis-use frameworks but with effort they can promote and facilitate a cleaner, more modular

Re: [PHP] WAP?

2006-11-02 Thread Dave Goodchild
You could try creating a stylesheet for media type=handheld, not sure how stable support is.

Re: [PHP] why so slow?

2006-11-02 Thread Dave Goodchild
Better still, keep them outside the docroot. If you do insist on having them inside and insist on calling them *.inc, create an .htaccess file that stops download of *.inc files.

Re: [PHP] Re: [BULK] [PHP] why so slow?

2006-11-01 Thread Dave Goodchild
The guys are right, there are many variables that could be affecting this. However, get rid of those tags before body and clean up your code - it does not validate as html 4.01. The DOCTYPE should be the very first thing in the page. Once you have amended these, revalidate (validator.w3c.org).

Re: [PHP] why so slow?

2006-11-01 Thread Dave Goodchild
Take out the comment before the DOCTYPE. There should be nothing before it.

  1   2   3   >