RE: [PHP] read only?

2007-08-23 Thread Chris Boget
Is there a simple php way to make a webpage read-only, please? Webpages are already read only. Well, read only in the browser. There is nothing to prevent the user from saving the page and altering to their hearts content. Did you mean to ask if there was a simple way to make a *form* read

RE: [PHP] keeping fields moving forward

2007-08-21 Thread Chris Boget
Is there a way to get the data from page one without letting the users modify the information. I guess I could write the data to the database Or you could store the data in the session space... thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Generating executable code

2007-08-13 Thread Chris Boget
Currently, I have an XML file that I load in, parse manually and iterate through the nodes to create objects, etc, using the node values as parameters. This works all well and fine but is a little resource intensive. Now, I can create a XSL template to transform the XML file and output all the

RE: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Chris Boget
I have worked now for several years happily with homesite 4.5, but now it looks like I have to switch to another system as homesite will not run without admin rights on a XP machine. What editors do you use? I used Homesite for the longest time until I was introduced to Visual Slick

RE: [PHP] Re: Pirate PHP books online?

2007-08-01 Thread Chris Boget
Some light humour: http://www.unm.edu/~humanism/socvsjes.htm I usually find your humour postings pretty funny but didnt find that in the least bit funny... :( Can't please everyone all of the time. Maybe you didn't get the joke :B Certainly it had be ROFLMFAO. Holy crap, that

RE: [PHP] Array difficulty

2007-07-31 Thread Chris Boget
At this point, $result would be equal to uppercase. I feel like this is a really kludgey way to accomplish this. Is there a better way? Couldn't you just do arsort($chance); $lastItem = chance[( count( $chance ) - 1 )]; ? Why iterate through the array when all you need is the last

Re: [PHP] Array difficulty

2007-07-31 Thread Chris Boget
At this point, $result would be equal to uppercase. I feel like this is a really kludgey way to accomplish this. Is there a better way? Not tested it, but max() should work as the first parameter can be an array: http://uk3.php.net/max Except he's looking for the key and not the value, which

RE: [PHP] Array difficulty

2007-07-31 Thread Chris Boget
Couldn't you just do arsort($chance); $lastItem = chance[( count( $chance ) - 1 )]; $lastItem = end( $chance ); end() returns the value as well. You would also need to use key(). thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] About One To Many MYSQL TO XML WITH PHP

2007-07-25 Thread Chris Boget
Do you know any website that might explain how to convert joined multiple tables(with every rows) to XML? If you use PEAR (or even if you don't), you might want to take a look at the following packages: http://pear.php.net/package/Structures_DataGrid_Renderer_XML

RE: [PHP] Pirate PHP books online?

2007-07-19 Thread Chris Boget
The idea of even offering an electronic version should be to drive sales for the hard copy. Maybe offer a Condensed Version electronically, that has enough content that readers can get enough of a feel for the product to drive a buying decision. Throughout, make reference to the full

RE: [PHP] How would i construct a date from year/week?

2007-07-08 Thread Chris Boget
How on earth would I do this? How can I construct a date only given a year and a week number? I hope you guys can help me here, as I have absolutely NO idea :) // whatever week number you are working with; arbitrary value here $weekNumber = 37; // seconds * minutes * hours; $day = 60 *

RE: [PHP] PHP Brain Teasers

2007-07-05 Thread Chris Boget
while( TRUE ) { $actions++; $words--; } $bets = array(1,2,3,4,5); unset( $bets ); $arr = array( 'this', 'that', 'times' ); $arr[] = 'behind'; for( $i = 0; $i = 6; $i++ ) { $deep++; } for( $i = 0; $i = 5; $i++ ) { $flies--; } thnx, Chris -- PHP General Mailing List

RE: [PHP] PHP Brain Teasers

2007-07-05 Thread Chris Boget
Actions speak louder than words. Yup. All bets are off. Indeed. Behind the times. Correct. Deep Six. Got it. for( $i = 0; $i = 5; $i++ ) { $flies--; } Time flies backwards? // Not sure on this one. I wasn't sure if this one was done well enough; I guess it wasn't. The

Re: [PHP] Database administration framework

2007-06-26 Thread Chris Boget
I just need a framework for administrating tables in a database. These are simple add/edit/remove operations from tables. Can you suggest a framework for this kind of job? Cause there are a lot of tables and I hope I can find a nice tool to work with. What database are you working with?

RE: [PHP] Force zero numbers on a integer

2007-06-19 Thread Chris Boget
I have a integer that is submitted by the user and i need it to always contain 5 digits. If the user submitted 45, i need it to be 00045. If the user submitted 4595, i need it to be 04595. How can i do this? Check out printf(); http://us.php.net/manual/en/function.printf.php thnx, Chris

Re: [PHP] Re: Edinburgh, Scotland: PHP Developer Position

2007-06-18 Thread Chris Boget
PS free milk and cookies and an afternoon nap actually sounds quite good now I come to think about it.. :p Almost better than healthcare and retirement benefits... :) thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] subtracting time from date and time

2007-06-18 Thread Chris Boget
Something like this will get it into a time stamp...and then you can do your calculations with ease, and reformat... ?php $str = 20070617T193500; list($date, $time) = explode(T,$str); ? Even easier: $timestamp = strtotime( $str );

RE: [PHP] subtracting time from date and time

2007-06-18 Thread Chris Boget
This works great tell you get to 8 hours ago it shows the correct time but it does not change the date to the day before. 8 hours ago should be 06/16/2007 11:35:00 but what it shows is 06/17/2007 11:35:00 Your code works for me. Though, I had to change the format of $str slightly to get

[PHP] Faulting module php4ts.dll

2007-06-08 Thread Chris Boget
We are running PHP 4.3.11 in a Windows Server 2003 environment using ApacheSSL v1.3. Starting just the other day, we starting seeing the following error pop up in the windows eventvwr: Faulting application Apache.exe, version 0.0.0.0, faulting module php4ts.dll, version 4.3.11.11, fault

[PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Is there anything special you need to do to utilize these functions? The former says it's available in versions 4 and 5 while the latter states that it's available in versions = 4.3 and 5 (although is deprecated). I'm currently running PHP version 4.3.11 on a Windows NT box. Based on both

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that would be missing? Is there somewhere I can go and check (possibly using phpinfo()) to find out if

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that would be missing? Is there somewhere I can go and check (possibly using phpinfo()) to find out if

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Oh, I also forgot to ask what do you get when you use stat()? stat() works, but not if I pass in the actual name of the file. I have to use fstat() in order to get the proper data. I'll have to check to see if there are any functions disabled in the php.ini (I don't believe there are

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Have you uncommented or added `extension=php_mime_magic.dll` in your php.ini file for mime_content_type()? What about adding something like this, as well: extension=php_mime_magic.dll is commented out in my php.ini. So that explains why the mime_content_type() isn't working. That's fine.

[PHP] file_get_contents

2007-06-07 Thread Chris Boget
Does file_get_contents() not work with absolute paths? I'm able to successfully write data to a file that I create dynamically but when I go back to actually read the contents of the file, nothing seems to work. Not file_get_contents(), not file(), not fread() and not fgets(); $mydata =

Re: [PHP] file_get_contents

2007-06-07 Thread Chris Boget
What's going on? That's the strangest absolute path I've ever seen... it seems to have some kind of non-absolute prefix. This has been a troll :) Pardon? I'm not sure what you mean? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

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

2007-05-30 Thread Chris Boget
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? This is precisely the point I was going to make. Unless an argument is passed in by reference for

Re: [PHP] How to eject cd-rom with php code?

2007-05-23 Thread Chris Boget
I am writing a script and need to eject the cd-rom drive at some point. Does anyone have an idea how to do this? This is a simple command isn't it? I greatly appreciate your help ?php system( 'eject [-dfnpq] [device | nickname]' ); ? http://us.php.net/manual/en/function.system.php

[PHP] Problem with mssql_query()

2007-05-09 Thread Chris Boget
I noticed the following in my logs: 22:04:42 [warning] [D:\PHP\pear\DB\mssql.php][439]: mssql_query(): Unable to set query 22:04:42 [info] Backtrace: [D:\PHP\pear\DB\mssql.php][439]; function( mssql_query ); args( 1[value:select @@ERROR as ErrorCode] 2[value:Resource id #21] ) 22:04:42

RE: [PHP] Problem with mssql_query()

2007-05-09 Thread Chris Boget
, May 09, 2007 11:07 AM To: Chris Boget Cc: PHP General Subject: Re: [PHP] Problem with mssql_query() Post your block of code from your connection string (Leave out your username/password info please) to the end of the result set for your query so I can take a look at it. On 5/9/07, Chris Boget

[PHP] PHPInfo data

2007-05-03 Thread Chris Boget
In looking at the PHPInfo data on our two seperate servers, I see that one server (server 1) has the following settings (while the other one, server 2, does not): Apache Environment downgrade-1_0 force-response-1_0 Environment BMC_GLOBALC_HOME PATROL_GC_VERSION PATROL_HOME PATROL_TEMP

RE: [PHP] sorting multi array

2007-04-25 Thread Chris Boget
I have the following array, which I need to sort by quantity... I need to keep the indexes if poss. This may not be the most elegant solution. Let's call your array $origArray $tmpArray = array(); foreach( $origArray as $elKey = $elArray ) { $tmpArray[$elArray['quantity']] = $elKey; } if(

Re: [PHP] sorting multi array

2007-04-25 Thread Chris Boget
this won't work if he has the same quantity for several keys, I think Yes, you are correct. If that is the case, then you would just need to change the following line $tmpArray[$elArray['quantity']] = $elKey; to $tmpArray[$elArray['quantity']][] = $elKey; then change logic in this loop:

Re: [PHP] Json.php

2007-04-18 Thread Chris Boget
So only one of these is kosher static: return Services_JSON::decode($data); class: $json = new Services_JSON; return $json-decode($data); but not both. I'm not trying to start (or further add fuel to) any kind of war but instead an earnest question: why not both? thnx, Chris -- PHP

[PHP] Outlook task via email

2007-04-10 Thread Chris Boget
I've done some searching on Google but haven't been able to come up with anything helpful. Has anyone on the list done any work on sending an Outlook Task as part of an email? Or does anyone know of a good resource that shows how this can be done? I'm going to be using PHP's mail() to

RE: [PHP] Parsing database variables

2007-03-30 Thread Chris Boget
But this is a much better way of doing this than using eval(). eval is an evil little function! eval() isn't so bad if you have absolute, total and complete control over the data you are pulling or using. But once someone else becomes involved (particularly the front end user), you are

Re: [PHP] Timezone offset

2007-03-28 Thread Chris Boget
On 3/28/07, Chris Boget [EMAIL PROTECTED] wrote: My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset as +0100 and not +. Why? I would think that it should return +. Am I wrong

[PHP] Timezone offset

2007-03-28 Thread Chris Boget
My server's timezone is set to (GMT) Greenwish Mean Time : Dublin, Edinburgh, Lisbon, London. But when I echo out date( 'O' ), it's returning the offset as +0100 and not +. Why? I would think that it should return +. Am I wrong? thnx, Chris -- PHP General Mailing List

RE: [PHP] Capitalizing the first letter

2007-03-13 Thread Chris Boget
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? It may not be the most efficient way of accomplishing this, but you could do something like: $string = 'SMith' $fixedString =

[PHP] Regular Expression help

2007-01-04 Thread Chris Boget
?php echo 'Is String: [' . ( is_string( 'a1b2c3' ) preg_match( '/[A-Za-z]+/', 'a1b2c3' )) . ']br'; echo 'Is Numeric: [' . ( is_numeric( 'a1b2c3' ) preg_match( '/[0-9]+/', 'a1b2c3' )) . ']br'; echo 'Is String: [' . ( is_string( 'abcdef' ) preg_match( '/[A-Za-z]+/', 'abcdef' )) . ']br'; echo

Re: [PHP] Converting array keys to variables?

2006-11-17 Thread Chris Boget
Is there a way that I can simply loop through each array and convert the keys into variables? I want to avoid having to write lines of: Look into extract(). http://us3.php.net/manual/en/function.extract.php thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Join table with clashing fieldnames

2006-11-08 Thread Chris Boget
I have an SQL query which has a simple join, this works and is fine the fields from the secondary table are added to the returned array. But what happens if I add another JOIN to a table which has fields which are the same name? Is there any way to have PHP prefix the key's (fieldnames) of the

Re: [PHP] How to Display a page while script runs?

2006-11-02 Thread Chris Boget
I have a php script which takes maybe 15-20 seconds to run, however until it completes a blank web page is displayed to the user. Is there a way/method which would enable me to give some feedback to the user while the script is running so the blank page is not displayed? You could look into

Re: [PHP] Run script every 30 seconds

2006-10-30 Thread Chris Boget
I have a script that I want it to run every 30 seconds, the problem is that cronjob can run every 1 minute only, do you have any solution ? Set the script up as a 2 iteration loop with sleep( 30 ) at the end of the first iteration. Or something like that... thnx, Chris -- PHP General

Re: [PHP] Job postings?

2006-10-24 Thread Chris Boget
This is a general etiquette question. I have a job posting for a junior PHP programmer. Are there any of the PHP mailing lists to which it would be appropriate to post that? If not, can anyone recommend a good place to post, especially a place that might be read by many people with specifically

Re: [PHP] foreach on a 3d array

2006-10-24 Thread Chris Boget
$languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){ if ( strstr( $_HTTP_ACCEPT_LANGUAGE, $language) ) { printcenterYou are from .$language[2].!/center; } } What you want is

RE: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-16 Thread Chris Boget
Can anyone point me to a really good end to end tutorial on extracting text from an Excel csv file and uploading it into MySQL via a PHP script? Actually, depending on the integrity of the data and the consistency of the format in the CSV file, you can do this simply and easily using

Re: [PHP] foreach

2006-10-10 Thread Chris Boget
$last = end ( $numbers ); reset ( $numbers ); I thought foreach() already performed a reset()? Why do it again here? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array size in bytes

2006-10-02 Thread Chris Boget
How about saving the array as a file and then do a filesize()? Wouldn't this work? $arraySize = strlen( implode( '', $array )); Though, additional work would need to be done for nested arrays. thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] PHP5 object construct

2006-09-23 Thread Chris Boget
ok, so if we were talking Java, perhaps you are looking for information that allows you to build 'accessor' and 'mutator' methods? If so, then your example should work (syntax aside). Here's another 'test' example that I just whipped up and tested that shows you can use any method name you wish.

[PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
I read about a feature of PHP5 OOP that is something like this in a book or a magazine a while back. But now I don't remember exactly how this works and I can't find any reference to it in the online docs. The basic idea is something along these lines: class MyClass { private $bob;

Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
I read about a feature of PHP5 OOP that is something like this in a book or a magazine a while back. But now I don't remember exactly how this works and I can't find any reference to it in the online docs. The basic idea is something along these lines: class MyClass { private $bob;

Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
Any particular place on that page I should be looking? I've read it several times and didn't see anything like the above. The closest thing I saw were actual methods called setBob() and getBob(), which isn't exactly what I'm looking for... Check here:

Re: Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
well, perhaps I'm not seeing what it is that you're looking for. No, I'm not sure you are. Take a look at my sample code again. Pay particular attention to how both $bob and $Bob are defined. class MyClass { private $bob; public $Bob { set( $var ) { $this-bob = $var; }

Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
ok, so if we were talking Java, perhaps you are looking for information that allows you to build 'accessor' and 'mutator' methods? Yes, exactly. I was flipping through a PHP5 book (possibly a magazine, but it was definitely about PHP5 and not Java) and I saw this new language construct.

Re: Re: [PHP] PHP5 object construct

2006-09-22 Thread Chris Boget
PHP has __set and __get in some versions... I think that's what you are looking for. Yes, but exactly. They'll do if there is no other way (as below)... If you told us which particular feature in that pile of code you're asking about, it would help... the ability to set an accessor like

Re: [PHP] Is there a list of all Timezones as an array or someting?

2006-09-20 Thread Chris Boget
I need to have a selectbox filled with the available timezones of PHP. We are using v5.1.x, and it supports the date_default_timezone_set() etc.. As value you can give a string to what timezone. I want all these strings within an array or something so i can create a selectbox so users can select

[PHP] DOM: Problem with loadXML(), createProcessingInstruction()

2006-09-19 Thread Chris Boget
Apparently, loadXML() overwrites the existing structure of the document when called. The problem is that when I try to add a PI (namely a stylesheet), it adds it to the end of the document thus making so that the XML is not transformed by the client. To get around this, I thought I could

[PHP] [Solved] Re: [PHP] DOM: Problem with loadXML(), createProcessingInstruction()

2006-09-19 Thread Chris Boget
Has anyone found a workaround for this; a workaround the fact that loadXML() completely replaces the existing document structure? It's amazing what you find out after you've already made yourself look foolish. $xmlStr = 'rootchild_elementblah/child_element/root'; $doc = new DOMDocument(

Re: [PHP] DOMDocument-saveXML()

2006-09-18 Thread Chris Boget
Would it be possible to point to the relevant page in the documentation that discusses how to do this? If there is nothing builtin to do it, how tricky could it be to strip off the first line after you saved it?... Not tricky at all. Crude, but effective, Captain -- Spock Exactly. I was

Re: [PHP] DOMDocument-saveXML()

2006-09-18 Thread Chris Boget
Perhaps you missed my reply. If you pass the root node then you get the entire document without the XML declaration. That's both elegant and built-in. I didn't miss it. But you have to pass in the root DomNode object. The only way to get it is by doing the following: $nodeList =

Re: [PHP] DOMDocument-saveXML()

2006-09-18 Thread Chris Boget
Why? documentElement property works just fine and is much more flexible. Where can you find a list of properties for the object? I don't see anything like this in the documentation. Doing a search: http://us3.php.net/manual-lookup.php?pattern=DOMDocumentlang=en only returns the methods.

Re: [PHP] DOMDocument-saveXML()

2006-09-18 Thread Chris Boget
Click on one of th edom methods... when you get to the details page for that method, see the left navigation menu, at the very top is a link to the class details which contains information about the properties: http://us3.php.net/manual/en/ref.dom.php Excellent. Thank you very much! :) thnx,

[PHP] DOMDocument-saveXML()

2006-09-17 Thread Chris Boget
I looked all through the documentation but was unable to find out if this was possible and, if so, how. When you call -saveXML(), it prints out the XML declaration ?xml version=1.0? alont with the structure of the document. Is there any way to suppress that? I'm trying to print out extra

[PHP] function does not exist

2006-08-25 Thread Chris Boget
I'm getting the following error all throughout my PHP log: [warning] [Unknown][0]: Unknown(): Unable to call () - function does not exist I'm not sure it's going to survive the mailing but it appears to be a tab character after the 'call' and before the '()'. I've spent days (not

Re: [PHP] Documentation of PHP sourcecode

2006-08-02 Thread Chris Boget
I am looking in some possibilities for automatically documenting my functions and classes. Preferably with some markup in the sourcecode and easy to implement. I am running Linux on my desktop so w* stuff won't do it for me :) Can anyone point me in the right direction? Check out

Re: [PHP] Setting cookie on one domain for an other domain

2006-07-20 Thread Chris Boget
However, I can not detect the cookie at domain2.com. You aren't going to be able to nor should you be able to. It's a security feature of the browsers. A solution would be to just make a redirect to the other domain where the cookie is set and then return. That would be one solution.

RE: [PHP] XSLT WYSIWYG?

2006-06-28 Thread Chris Boget
Perhaps, though, there is some magical PHP WYSIWYG tool out there to compare the HTML and the XML and make an XSLT for me?... It's not PHP based, but XMLSpy will do exactly what you need. thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Controlling a scanner with PHP

2006-06-27 Thread Chris Boget
I also thought it always had to be run under a web server, and would be interested to know what the other options/ opportunities are. You can run it from the command line. See http://us3.php.net/manual/en/features.commandline.php thnx, Chris -- PHP General Mailing List

RE: [PHP] Need help with PEAR Quickform

2006-06-22 Thread Chris Boget
I am busy working on a form using QuickForm. I would like to make use of a confirmation page where the user must eitheir select to change the details or continue. Does anyone know how to achieve this? On POST, you could redisplay the form in a Frozen state. If the form is frozen, you

Re: [PHP] Delete

2006-06-05 Thread Chris Boget
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote: You may find it easier to generate links of the form delete.php?id=1, etc. Then you won't have to use a seperate form for each link. The id will be available in delete.php in $_GET. The same sanity checking applies in this case too. Gah! That

Re: [PHP] Using 'header' as redirect

2006-05-30 Thread Chris Boget
As you can see, by the time that index.php includes the subpage, it has already outputted HTML. According to using the header() function, you are not allowed to output any HTML *before* using header(). However, I am doing this and it is redirecting fine. You can also always use the old

[PHP] sprintf() oddity

2006-04-18 Thread Chris Boget
What's going on here: $number = 50.1234567890; echo sprintf( '%.05f', $number ); result: 50.12346 $number = 5.1234567890; echo sprintf( '%.05f', $number ); result: 5.12305 $number = 5000.1234567890; echo sprintf( '%.05f', $number );

RE: [PHP] interview

2006-04-13 Thread Chris Boget
can you please send some interview questions for php i have in few days to inteview some people. 1) If I use PHP, and you use PHP, and everyone on this list uses PHP... what colour is my car? Hamburger. Oh, wait... 2) How do I avoid the number 42? Trip over the number 41 and apologize

[PHP] echo, print and is_callable()/function_exists()

2006-04-07 Thread Chris Boget
Because both echo and print are language constructs and not actual functions, you can't seem to use either is_callable() or function_exists() on either to determine if they are valid 'function' calls. Is there any other way to determine to check to see if I can execute either or? I'm writing a

[PHP] Argument passed by reference?

2006-04-06 Thread Chris Boget
Is there a way to test to see if a function argument was passed by reference instead of by value? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Argument passed by reference?

2006-04-06 Thread Chris Boget
The way I understand it, pass by reference in php is determined in the function definition and not the function call. Something like: You used to be able to pass by reference at run time. But I see that is no longer allowed... :| So I guess that makes my question moot. Thanks for your help.

Re: [PHP] Going loopy with arrays.....

2006-03-31 Thread Chris Boget
a. loop through it and recognize when I have com upon a new sub-array so that I can do 'new' output 2. OR get each of the sub-arrays out as individual arrays. This might help get you going in the right direction... script language=php function print_elements( $var ) { if( is_array(

[PHP] addslashes()

2006-03-29 Thread Chris Boget
Can someone explain something to me: script language=php $string = Bob's carwash's door; echo 'addslashes(): ' . addslashes( $string ) . 'br'; echo 'mysql_escape_string(): ' . mysql_escape_string( $string ) . 'br'; /script Outputs: addslashes(): Bob''s carwash''s door mysql_escape_string():

Re: [PHP] addslashes()

2006-03-29 Thread Chris Boget
- From: Jasper Bryant-Greene [EMAIL PROTECTED] To: Chris Boget [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Wednesday, March 29, 2006 5:29 PM Subject: Re: [PHP] addslashes() From http://php.net/addslashes : Having the PHP directive magic_quotes_sybase set to on will mean

Re: [PHP] Where can I find nice Web icons for custom admin interface?

2006-03-02 Thread Chris Boget
I have a habit of designing pretty much everything myself as far as CMS and admin areas, but I was wondering if anybody knew where to find Web icons to make the result look very professional? I am really not a graphical/layout guy! This is OT but you can always take a look on

Re: [PHP] Date question

2006-02-24 Thread Chris Boget
I have a datetime column in MySQL DB. How can I match to that column from php code if I only have the date information available. 2006-02-24 12:00:00 against2006-02-24 This might be more SQL question sorry about that. use date_format(%Y-%m-%d,'date_column') in the sql

Re: [PHP] Static and Global at the same time!

2006-02-10 Thread Chris Boget
Can I have a variable that is static and global at the same time within a function? Let's say I have: $data = ; function newdata() { static global $data; $data [$i] = $newdatatobestored_inthearray; } Isn't a global variable static within the function by it's nature of being global? Making

[PHP] PHP Job opening in UK, London

2006-01-27 Thread Chris Boget
My company is looking for a PHP developer to work out of their London office. If you live in/around the city and are interested, please respond to me (personally, not the list :p) with your resume/CV. thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP][SOLVED] Re: usr VAR value as a VAR Name

2006-01-26 Thread Chris Boget
echo $$foo Let me start by saying there is nothing wrong with the above and it's doing exactly what the OP needed. However, when I use variable variables, I prefer to use the following notation: ${$foo} It makes the coder's intention clear and makes it so that it can't be mistaken for a

Re: [PHP][SOLVED] Re: usr VAR value as a VAR Name

2006-01-26 Thread Chris Boget
Let me start by saying there is nothing wrong with the above and it's doing exactly what the OP needed. However, when I use variable variables, I prefer to use the following notation: ${$foo} It makes the coder's intention clear and makes it so that it can't be mistaken for a possible typo

[PHP] Regular Expression help

2006-01-19 Thread Chris Boget
I've been beating my head against the wall for a while trying to come up with the RE I need to use. I have a camel case word - let's use JimJoeBobBriggs. I need to come up with a RE that will fine all the upper case characters and insert an underscore prior to those characters with the exception

Re: [PHP] The meaning of and @

2006-01-09 Thread Chris Boget
and it's used wrongly in 99.99% of the cases. Are you trying to tell me that I'm *not* supposed to use it in front of *every* php function Oh, come *on* Why not?!? It makes the function call look so pretty and important/official looking... or something... :p thnx, Chris -- PHP

Re: [PHP] Timezone and DST

2006-01-05 Thread Chris Boget
I've got a little problem where our servers are in PST but the customer operates in Hawaii (-10 GMT). I believe I can just get the time for them by doing something like date(d H i, strtotime('now -2 hours') ); But here's the catch, how should I deal with day light savings ( DST) . In hawaii

Re: [PHP] What software do you use for writing PHP?

2005-12-15 Thread Chris Boget
Visual Slick Edit works on a Mac. As I've said before (and will undoubtedly say again), it is by far the best IDE I've used to date. Features: http://www.slickedit.com/content/view/353/217 System requirements: http://www.slickedit.com/index.php?option=com_contenttask=viewid=161Itemid=57 thnx,

Re: [PHP] quickly discovered why refresh isn't nice

2005-12-12 Thread Chris Boget
hello, I just found out why one reason for a meta refresh is a bad idea, it does exactly that, it refreshes the page every 3 or 2 or 0 seconds which basically is constant..so maybe the header idea is better in this case. While this is very true, what is typically the case when you use meta

Re: [PHP] What software do you use for writing PHP?

2005-12-07 Thread Chris Boget
Pt'Edit' in DOS. ;) Absolutely!! It can't be beaten for undocumented features. :p thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What software do you use for writing PHP?

2005-12-06 Thread Chris Boget
Forever now I've been using Frontpage for all my web work including php. I'm sure there's better software out there that is more suited to writing and editing PHP pages. What do you all use? I use Visual SlickEdit. You should check it out; it's a very powerful IDE. http://www.slickedit.com

Re: [PHP] What software do you use for writing PHP?

2005-12-06 Thread Chris Boget
HomeSite. I tried several others but always came back to HomeSite. :) I was a massive HomeSite proponent until I started using SlickEdit. Once I did, I never looked back. thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What software do you use for writing PHP?

2005-12-06 Thread Chris Boget
I primarily code in Dreamweaver 8. Two of my favorite features that were added from MX are as follows: 1. Code folding, basically you can collapse blocks of code. SlickEdit has this feature. 2. The built in FTP client. This one as well. I used Dreamweaver a while back (admittedly an older

Re: [PHP] What software do you use for writing PHP?

2005-12-06 Thread Chris Boget
When you say SlickEdit has a ftp client built in, is it a separate window that gets launched, or is it more integrated, like you can just right click on your list of files and say put these files up on the server. It's integrated. thnx, Chris -- PHP General Mailing List

Re: [PHP] PDF Generator

2005-12-02 Thread Chris Boget
What is the best FREE pdf generator for PHP? We use HTMLDoc and it works reasonably well. thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] using ($test)?$true:$false in a string

2005-11-21 Thread Chris Boget
and I feel it would be more elegant to be able to do something like: $var =first part of string {(($a==$b)?$c:$d)} rest of string; $templateStr = 'first part of string %s rest of string'; $outputStr = sprintf($templateStr, (($a==$b)?$c:$d)); That is so totally slick! I'm definitely going to

[PHP] Regex help

2005-11-18 Thread Chris Boget
Why isn't this regular expression ^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$ allowing for this value: 'Co. Dublin' (w/o the single quotes) ? It's failing the regular expression match... thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Wierd error

2005-11-17 Thread Chris Boget
I'm seeing the following line showing up in my logs: 08:08:30 [warning] [Unknown][0]: Unknown(): Unable to call () - function does not exist and I've narrowed it down to this line of code: settype( $dbObject, null ); When I comment out the above line, the error goes away. When I

  1   2   3   4   5   >