Re: [PHP] notices nightmare - looking for a regex solution

2011-06-01 Thread Hans Åhlin
2011/6/2 Merlin Morgenstern : > Hi there, > > I am working on a pretty huge site with thousands of files with php code. > Unfortunatelly the app throws a ton of notices du to missing '' in arrays. > Of course I could simply disable the output on the dev server to surpress > notices, but I would rat

Re: [PHP] PHP 5.3.3 operator & problem

2011-06-01 Thread 李白|字一日
both php 5.1.6 and php 5.3.3 are php 5. but it seems they are different in processing & operator. 2011/6/2 Simon J Welsh > On 2/06/2011, at 2:44 PM, 李白|字一日 wrote: > > > hi, all > > > > i currently have a project which using & operator on creating a new > object. > > > > like: > > $class =& new

Re: [PHP] PHP 5.3.3 operator & problem

2011-06-01 Thread Simon J Welsh
On 2/06/2011, at 2:44 PM, 李白|字一日 wrote: > hi, all > > i currently have a project which using & operator on creating a new object. > > like: > $class =& new Class(); > > it works properly in php 5.1.6, > but not in php 5.3.3 > and it gives offset errors to me. > > is there anyone knows why an

[PHP] PHP 5.3.3 operator & problem

2011-06-01 Thread 李白|字一日
hi, all i currently have a project which using & operator on creating a new object. like: $class =& new Class(); it works properly in php 5.1.6, but not in php 5.3.3 and it gives offset errors to me. is there anyone knows why and how to fix this problem?

Re: [PHP] notices nightmare - looking for a regex solution

2011-06-01 Thread Adam Richardson
On Wed, Jun 1, 2011 at 6:26 PM, Merlin Morgenstern wrote: > Hi there, > > I am working on a pretty huge site with thousands of files with php code. > Unfortunatelly the app throws a ton of notices du to missing '' in arrays. > Of course I could simply disable the output on the dev server to surpre

Re: [PHP] notices nightmare - looking for a regex solution

2011-06-01 Thread Matt Giddings
I was thinking about this a little more and thought that the method I sent before will work, but it has the potential of clobbering variables that are not related to this warning/notice. Best bet would be to create a list of file names that contain the offending variables then feed that to sed usi

Re: [PHP] notices nightmare - looking for a regex solution

2011-06-01 Thread Matt Giddings
You can put an @ symbol in front each item that is throwing the error. That may take some time though. You could use something like find /htdocs_folder -name \*.php -print | xargs sed -i s/\$array_name/@$array_name/g That might get you what you're looking for. But be cautious because this meth

Re: [PHP] notices nightmare - looking for a regex solution

2011-06-01 Thread Govinda
> I am working on a pretty huge site with thousands of files with php code. > Unfortunatelly the app throws a ton of notices du to missing '' in arrays. Of > course I could simply disable the output on the dev server to surpress > notices, but I would rather like to get it fixed. > > Has somebo

[PHP] notices nightmare - looking for a regex solution

2011-06-01 Thread Merlin Morgenstern
Hi there, I am working on a pretty huge site with thousands of files with php code. Unfortunatelly the app throws a ton of notices du to missing '' in arrays. Of course I could simply disable the output on the dev server to surpress notices, but I would rather like to get it fixed. Has someb

Re: [PHP] displaying a pdf

2011-06-01 Thread Ashley Sheridan
On Wed, 2011-06-01 at 13:31 -0500, Tamara Temple wrote: > On Jun 1, 2011, at 9:54 AM, Jim Giner wrote: > > > Well - the code works just fine as is and that's all I care about. > > As for > > Richard's comments - the url in my header(Location) statement > > points to > > a pdf file, not a

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread Tamara Temple
On Jun 1, 2011, at 10:40 AM, Adam Preece wrote: sorry i should of explained a little more in depth :-). i am using smarty templating engine, and it needs me to pass in an associative array. only an id column and a the name column. i know if i use a more specific query, but if i have the res

Re: [PHP] displaying a pdf

2011-06-01 Thread Tamara Temple
On Jun 1, 2011, at 9:54 AM, Jim Giner wrote: Well - the code works just fine as is and that's all I care about. As for Richard's comments - the url in my header(Location) statement points to a pdf file, not a php file, so the target is not sending any headers (that I know of ). The

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
sorry i should of explained a little more in depth :-). i am using smarty templating engine, and it needs me to pass in an associative array. only an id column and a the name column. i know if i use a more specific query, but if i have the result set already could i build the array so it suits

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread jean-baptiste verrey
with mysql use mysql_fetch_assoc, is that what you are asking for ? On 1 June 2011 16:31, Adam Preece wrote: > hi all, > > is it possible to dynamically build a key value pair array in php from a > database result? > > if so how? > > kind regards > > Adam > -- > PHP General Mailing List (http://

[PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
hi all, is it possible to dynamically build a key value pair array in php from a database result? if so how? kind regards Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] displaying a pdf

2011-06-01 Thread Jim Giner
Well - the code works just fine as is and that's all I care about. As for Richard's comments - the url in my header(Location) statement points to a pdf file, not a php file, so the target is not sending any headers (that I know of ). -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: smart auto download file

2011-06-01 Thread Jonesy
On Tue, 31 May 2011 21:01:09 +0100, Stuart Dallas wrote: > > Sometimes I miss the way the web was before javascript :/ Sometimes??? Jonesy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] displaying a pdf

2011-06-01 Thread Richard Quadling
On 1 June 2011 06:53, Tamara Temple wrote: > > On May 30, 2011, at 10:01 AM, Jim Giner wrote: > >> Thanks for the attempt Simon, but your code only displayed gibberish. >> While looking around again for help, I found this and it works perfectly: >> >> > session_start(); >> // >> //  Specify the na