[PHP] ZendCodeAnalyzer oddity

2012-10-31 Thread Christoph Boget
PHP 5.3.15, Zend Code Analyzer 1.2.2 thnx, Christoph

Re: [PHP] Variable Question

2012-04-19 Thread Christoph Boget
> I am trying to use this while look to assign them to variables: > $word_1 > $word_2 > $word_3 > ... > $word_25 This should work for you: http://us3.php.net/manual/en/function.extract.php thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Issues with simplexml_load_string()

2011-10-07 Thread Christoph Boget
data at all. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Issues with simplexml_load_string()

2011-10-06 Thread Christoph Boget
me] => Add Me ) ) ) ) I get the attributes but not the CDATA. Looking at the doc page for simplexml_load_string() (http://us.php.net/manual/en/function.simplexml-load-string.php and http://us.php.net/manual/en/libxml.constants.php), I don't se

[PHP] Issues with simplexml_load_string()

2011-10-06 Thread Christoph Boget
hp), I don't see a way to get access to both. Am I missing something? Or is this really not possible? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
;date'] such that it would break json_encode() in one case and not the other. Is it that PHP is taking the string which is returned as part of the result set and encoding it to match the charset passed in from the browser? thnx, Christoph * Disclaimer : the actual code (and data repository) I

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
ffing prior to every call to json_encode() and massage the data accordingly depending on what I find? That seems somewhat excessive. But based on what you are saying and based on what I'm witnessing, it seems like there is no other way around that. thnx, Christoph -- PHP General

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
> You should set the charset of your page by meta tag in its head. Do you have a source of reference to which you point me? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
ommand line? Is there a way I can get around this on the back end? Make it so that it'll behave the same in all cases? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] json_encode() behavior and the browser

2010-09-01 Thread Christoph Boget
ncode() behaves when executed as part of the PHP script. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Extending Exception

2010-07-21 Thread Christoph Boget
meters for Exception([string $exception [, long $code ]]) and the line number it dies on is the line in the MyException::__construct() where it is calling the parent's constructor. So what's going on? Is the documentation wrong? Is this a bug? Am I doing something wrong? I'm using PH

Re: [PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
sleep( 1 ); } ?> thnx, Christoph

Re: [PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
o contain a list of files in that directory at the time the object was constructed? thnx, Christoph

Re: [PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
ollection... :( thnx, Christoph

[PHP] DirectoryIterator

2010-01-26 Thread Christoph Boget
I've looked through the docs but was unable to find out if this is possible; I hope it is. Is there a way that you get the size/length of the collection to be iterated (e.g. the total number of files) without having to iterate through at least once? thnx, Christoph

Re: [PHP] Problem with XPath query

2009-12-14 Thread Christoph Boget
much quicker. ;) thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem with XPath query

2009-12-14 Thread Christoph Boget
]: Invalid predicate If I remove this part of the query [...@alias="widgetType and @value="system"] the error goes away. As far as I can tell from googling around, the query is valid. If that's the case, I don't understand what's causing the error. Could someone e

Re: [PHP] stdout as input

2009-09-24 Thread Christoph Boget
> Exactly.  And if you just want redirected data you can try: > $data = file_get_contents("php://stdin"); > --or-- > For an array of lines: > $lines = file("php://stdin"); This is exactly what I was looking for. Thanks Shawn and Ben! thnx, Christoph

Re: [PHP] stdout as input

2009-09-24 Thread Christoph Boget
;m starting from would change. I suppose I could pass those arguments to my script and access it using argv but I'm actually kind of curious how (if) I can access output which has been piped (or redirected) to my script. thnx, Christoph -- PHP General Mailing List (http://www.php

[PHP] stdout as input

2009-09-24 Thread Christoph Boget
and going with the STDIN and STDOUT constants. None of that worked. Is there a way I can pipe/redirect output from a command line uhh, command as input to my script? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Generic decorators and type hinting

2009-09-02 Thread Christoph Boget
r::time( $obj ); // $obj becomes a Timer obj with $obj inside it $obj->thingMethod(); // Timer passes call to Timer->obj thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
spreadsheet saved using Office 2003 on XP and received the same output: application/msword. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
d it may perhaps be an issue with the documents themselves. As I stated in a post I just made, the excel document I'm looking at was created using Office 2007 for the Mac. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
t-stream' $ file -i excel.xls excel.xls: application/msword The xls file I am using was generated with Excel (of Office 2007) for the Mac. So either you have a different magic file (assuming that's what the file command uses) than I do or different versions of excel contain different informati

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
ere is no distinction. That seems both odd and wrong to me. But not nearly as wrong as fileinfo reporting "application/msword" as the mime type of an excel document. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] fileinfo returning wrong mime type for Excel files

2009-07-29 Thread Christoph Boget
there something else I'm missing? Or doing wrong? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] un-de-re-deprecation

2009-07-06 Thread Christoph Boget
is_a() added back in when it was tossed out on it's head in 5.0? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Does something like this exist?

2009-06-29 Thread Christoph Boget
d want to eventually add anyway but it's something we could do over time as we became much more familiar with the framework. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Does something like this exist?

2009-06-29 Thread Christoph Boget
lasses (eg, instantiation) I've done some looking around but haven't really been able to find anything that does even some of this. I could write functionality that does this but didn't want to reinvent the wheel. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Warning: Division by zero

2009-04-30 Thread Christoph Boget
oint. For it's use in the above equation, neither case is valid. Consequently, you really should be doing some validation at some point prior to that line. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Warning: Division by zero

2009-04-30 Thread Christoph Boget
g used. e.g., $iVar = 1; if(( isset( $_REQUEST['MY_NUMBER'] ) && ( is_numeric( $_REQUEST["MY_NUMBER']))) { $iVar = $_REQUEST['MY_NUMBER']; } $iCalculatedValue = $x / $iVar; thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Symlinks and ownership

2009-04-23 Thread Christoph Boget
it in the directory, the group for the link has not been changed to what I set it to. Is that not something you can do for symbolic links programatically? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Namespce operator

2009-03-25 Thread Christoph Boget
ction? :P Though I have read the explanation (many, many times) and I still don't understand why '::' wasn't used. MyClass::MyStaticMethod is utilizing namespacing. Why it was felt that '::' as the official namespace operator would mess that up is beyond my ken

Re: [PHP] Re: Looking for some PHP OO programming guides

2009-02-11 Thread Christoph Boget
contemplation for everyone. :p thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Christoph Boget
By defining an alias, it removes the ambiguity and allows mysql to return the value of both columns. In your code, you would just reference it using: $rowData['EmployeeName'] $rowData['EmployerName'] I hope that helps explain aliases a bit. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Christoph Boget
selecting, you'll need to use aliases. http://dev.mysql.com/doc/refman/5.1/en/identifiers.html In your code, when you are referencing the column, do so using the alias. That should solve your problem. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Create image from HTML

2009-01-09 Thread Christoph Boget
othing like this out there or if I'm just looking in the wrong places. Any advice/suggestions would be greatly appreciated! thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Freeing memory for DOMDocument

2009-01-07 Thread Christoph Boget
my scripts inside a for/while loop; in the > end I opted for a CLI script which opened worker threads then > killed/restarted them when memory usage was X. Unfortunately, that is not an option for me. It just blows my mind that a method to free memory used for a DOMDocument object wasn&#x

[PHP] Freeing memory for DOMDocument

2009-01-07 Thread Christoph Boget
one know how (or even if) I can explicitly free the memory used for the DOMDocument? Any help/advice would be greatly appreciated! thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] class constructor overloading

2008-10-23 Thread Christoph Boget
>> is it possible to overload the class construct(or) ? >> if yes, how ? No, it's not. > class A > { >function __construct() >{ >echo "A"; >} > } > > class B extends A > { >function __construct() >{ >echo "B"; >

Re: [PHP] Re: Singletons

2008-10-22 Thread Christoph Boget
n. As he said, it's not pretty but it is simple. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
#x27;t exist. Not particularly > pretty, but definitely simple. No, not pretty at all though it would address my issues. Thanks for the idea! thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
activities of the constructor are irrelevant. They aren't irrelevant if the class can be instantiated directly. That sort of kind of breaks the whole singleton thing... thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
ass' constructor was defined public. > Singletons are not rocket science, but as with all patterns you really need > to understand the theory before trying to implement and use it. Agreed. But apparently implementing them in PHP leaves things to be desired. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
n avoids > cloning this instance', E_USER_ERROR); } Adding the above to my sample class (from my OP) did nothing. Should it have? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Singletons

2008-10-20 Thread Christoph Boget
tThisProp();: [' . $one->getThisProp() . ']'; I would have thought that both $one and $two would be referencing the same object but they aren't. Apart from making the constructor private, is there any way I can ensure that there is ever only one instance of an object? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Static method variable

2008-09-18 Thread Christoph Boget
Perhaps I'm misunderstanding what a static method variable is supposed to do. I thought the value would be static for an class' instance but it appears it is static across all instances of the class. Consider: class StaticTest { public function __construct() { } public function test( $n

[PHP] SOAP call

2008-09-09 Thread Christoph Boget
Is there a way to call a SOAP function and pass the required XML as an argument instead of an object? I can get this to work: $oClient = new SoapClient( $sWSDL_URI, array( 'trace' => TRUE, 'exceptions'=> TRUE ); $oArgObj = new ArgObj(); $oArgObj->node1 = 'value' $oArgObj->node2 = 'value' $oA

Re: [PHP] Attributes vs. Accessors

2008-08-25 Thread Christoph Boget
nceptually, it is my preference to keep a class as much of a black box as possible and accessor methods allow for that. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FCKEditor, TinyMCE, ... I need a light weight WYSIWYG HTML Editor

2008-08-18 Thread Christoph Boget
u know people who are still using IE5.5? Seriously? Textareas do have their problems but I wouldn't consider IE5.5 one of them... :p thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Class diagram util

2008-08-13 Thread Christoph Boget
I'm curious, what utilities do you guys use, if any at all, to map out/diagram your classes? I'm looking for a decent (I don't really need a ton of bells and whistles) freeware app but my searches thus far have proven fruitless. thnx, Christoph -- PHP General Mailing List (htt

[PHP] Re: More SOAP questions. Also, SOAP bug? Or just me? (long)

2008-08-11 Thread Christoph Boget
t( $oResponse ); I am seeing: MyResponseClass::__set_state(array( 'any' => '', )) That doesn't seem right. Further, if I try to access the "any" property of the object, there is no value (as illustrated above). It's as if nothing was done with the XML SOAP response w/r/t defining the classmap option. So what's going on? Am I doing something wrong? Am I totally misunderstanding something here? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] More SOAP questions. Also, SOAP bug? Or just me? (long)

2008-08-08 Thread Christoph Boget
ed below. So again, is there something different I should be doing that can or does deal with this? Is it a bug? * Finally, the last soap fault message I'm getting (alluded to above) is one that is telling me that there was no POST data. I see that the SOAP envelope/body is populated with all the nodes and data the operation is expecting but didn't ultimately get. It seems to me that when the SoapClient is making the remote function call, it is passing the data as part of a GET. Is it possible to tell the soap client that it should use POST instead? I don't see anything in the documentation the deals and/or discusses this. Any help and/or advice would be greatly appreciated! thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] A few questions about PHP's SOAP module

2008-08-07 Thread Christoph Boget
How can I set up the attributes illustrated above? Encoding, node-type, etc? Is that possible? * Finally, is there a really good and/or comprehensive tutorial and/or write-up on PHPs SOAP module? The documentation is pretty spartan and what I have found doesn't really go

[PHP] Object overhead vs. arrays

2008-08-07 Thread Christoph Boget
mark script, it seems like it should be the latter... Advice and/or input would be much appreciated! thnx, Christoph sVar1 = $sValue; } public function setVar2( $sValue ) { $this->sVar2 = $sValue; } public function setVar3( $sValue ) { $this->sVar3 = $sVal

Re: [PHP] Code beautifier

2008-07-24 Thread Christoph Boget
ally useful features that make coding a lot more fun. http://www.slickedit.com/ thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] problem with DOMDocument

2008-07-18 Thread Christoph Kappestein
hi I have trouble while creating an DOMDocument. When I make $test = new DomDocument('1.0'); php tells me a warning error like: Entity: line 1: parser error : Start tag expected, '<' not found ... Because of unknow reasons the DomDocument constructor expected a tag like ''. Ive looked in t

Re: [PHP] Inspiration for a Tombstone.

2008-06-26 Thread Christoph Boget
> if ($user_name = "Dan Brown") { > echo "GOING DOWN?!"; > } else { > echo "Welcome to Heaven"; > } So I guess that means we're all on the express elevator down. Looks like it'll get awfully full... :p thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] Inspiration for a Tombstone.

2008-06-26 Thread Christoph Boget
> "Always on the edge of greatness" "Tripped on his way to the edge of greatness" thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Method chaining off constructors

2008-06-06 Thread Christoph Boget
her: (new bob())->one()->two() ? Or, rather, why couldn't that have been taken into consideration? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Method chaining off constructors

2008-06-06 Thread Christoph Boget
st thought maybe the answer was that simple and you're > like I am--you've been staring at a tree for so long, racking your > brain, that you forget about the forest altogether. :) The constructor should already be returning $this. thnx, Christoph -- PHP General Mailing Li

[PHP] Method chaining off constructors

2008-06-06 Thread Christoph Boget
; } public function two() { echo '->two()'; return $this; } } This works: $bob = new bob(); $bob->one()->two(); whereas this doesn't. $bob = new bob()->one()->two(); Why? I thought constructors returned the object? thnx, Christ

[PHP] Function not in the documentation

2008-05-20 Thread Christoph Boget
I ran across a PHP function, strip_illegal_chars(), but can't seem to find anything about it in the documentation. Does anyone know precisely what it does? Or where I can find actual documentation for that function? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Problem with DOMElement/Node

2008-04-09 Thread Christoph Boget
> DOM Nodes are specific to the document in which they were created, so > you can't just append a node from one document into another document. > The importNode function does what you want. > http://us2.php.net/manual/en/function.dom-domdocument-importnode.php Interesting. Why is that, out of

[PHP] Problem with DOMElement/Node

2008-04-09 Thread Christoph Boget
Could someone explain to me what I'm doing wrong? I'm trying to get an element from one DOMDocument and append it to a different DOMDocument. The (simplified) output of saveXML() from the first DOMDocument is as follows: 12 Here is a snippet of code: createElement( 'menu' ); $oRootNode->setAt

Re: [PHP] April Fools Easter Egg

2008-04-01 Thread Christoph Boget
> >> Wobbly PHP logo on mine (PHP-5.2.5 debian) > > That's all I see for PHP-5.2.1. Should there be something more? > Probably not, but check the source. :-) I checked the source. I didn't notice anything unusual... thnx, Christoph -- PHP General Mailing L

Re: [PHP] April Fools Easter Egg

2008-04-01 Thread Christoph Boget
> > You got me. > Wobbly PHP logo on mine (PHP-5.2.5 debian) That's all I see for PHP-5.2.1. Should there be something more? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Having problems with XMLDocument

2008-03-27 Thread Christoph Boget
What is wrong with the following code? It's throwing a DOMException when I try to set the id attribute for the $lvl1Node but I can't see why... $doc = new DOMDocument('1.0', 'UTF-8'); $root = $doc->appendChild( $doc->createElement( 'root' )); for( $a = 0; $a <= 3; $a++ ) { $lvl_1_id =

Re: [PHP] Possible using XPath?

2008-03-27 Thread Christoph Boget
> > Is that possible? Or is this something I'd have to do programatically > > using the nodes returned by the XPath query? Basically, I'm just > > trying to get a fragment of the larger xml document... > //[EMAIL PROTECTED]'gc3']/child/ancestor-or-self::* Thanks for the response. However

[PHP] Possible using XPath?

2008-03-27 Thread Christoph Boget
cally, I'm just trying to get a fragment of the larger xml document... thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] best practices in error handling in PHP

2008-03-12 Thread Christoph Boget
> I want to know what is the best solution for handling errors. After reading > some > documents dealing with the subject, i have three options: > * Using a class for error handling > * Using PEAR error object > * Using try and catch exceptions > The error handling i want to implement will be

Re: [PHP] reverse string without strrev();

2008-02-28 Thread Christoph Boget
> >> should it not use curlies? > > No, they will be deprecated as of PHP6. (Square brackets used to be, but > > have been undeprecated and are back in favour!) > cheers for the heads up on curlies Mike :) Where can I read more information about this? thnx, Chris -- PHP General Mailing List

Re: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Christoph Boget
> http://msdn2.microsoft.com/en-us/library/aa479002.aspx > I read an Article on the above Microsoft website stating the reason why to > Migrate from PHP to > ASP.NET. So can you please justify this proofs from Microsoft and let > everybody knows if they are > all TRUE and MEANIFUL atall or they a

Re: [PHP] www. not working

2008-02-19 Thread Christoph
Don't do that. Some sites may or may not use www. for whatever reason... Usually screwed-up A-name records by incompetent sysadmins, but there it is... Really? So games.yahoo.com blogreport.salon.com mirror1.downloads.com are examples of screwed up records by incompetent sysadmins? thnx, Chr

Re: [PHP] check if website has www. in front of domain

2008-02-16 Thread Christoph
// Check if site is preceeded by 'WWW' public function checkWWW() { $myDomain = $_SERVER['SERVER_NAME']; $FindWWW = '.'; $POS = strpos($myDomain, $FindWWW); if ($POS === false) { return false; } else { return true;

Re: [PHP] Template system in PHP

2008-02-13 Thread Christoph Boget
> > when I'm debugging I like to be as concise as possible. > Concise? Really? Fair enough. Perhaps I should have said concise with my code, verbose with my actual messages. :p thnx, Chris Looking for

Re: [PHP] Template system in PHP

2008-02-13 Thread Christoph Boget
> > As an aside, you can save lines when debugging by doing: > > echo '' . print_r( $var, TRUE ) . ''; > OMG, thanks for that. Lines are so expensive nowadays and all. Sarcasm aside, when I'm debugging I like to be as concise as possible. thnx, Chris -- PHP General Mailing List (http://www.php

Re: [PHP] Template system in PHP

2008-02-12 Thread Christoph Boget
> I agree. I usually add a little function like this to my PHP projects: > function debug( $var ) > { > echo ''; > print_r( $var ); > echo ''; > > } As an aside, you can save lines when debugging by doing: echo '' . print_r( $var, TRUE ) . ''; thnx, Chris -- PHP General Mailing List (ht

Re: [PHP] Template system in PHP

2008-02-12 Thread Christoph Boget
> > eval() is my favorite templating engine. > > http://php.net/eval > Ditto on Eval() > PHP is already a templating system. Why go the long way around? eval()? Man, you guys have some seriously large cajones. :p thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] How can I do this -- method chaining

2008-01-29 Thread Christoph Boget
> On Jan 29, 2008 2:37 PM, Paul Scott <[EMAIL PROTECTED]> wrote: > > Looks like a repurpose of one of my posts: > > http://fsiu.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=gen9Srv59Nme5_7092_1182404204 > actually, this is slightly different; here we are talking about being > able to im

[PHP] How can I do this -- method chaining

2008-01-29 Thread Christoph Boget
Constructors return the object, correct? If so, how can I do this: class Bob { private $blah; _construct( $blah ) { $this->blah = $blah; } public getBlah() { return $this->blah; } } echo Bob( 'Hello!' )->getBlah(); When I try that, I get the message "Undefined function Bob".

Re: [PHP] Determine which are user defined keys?

2008-01-11 Thread Christoph Boget
like this: Array ( [joe] => array( bob, that ) [0] => array( briggs, other ) [1] => array( whatever, this ) [2] => array( whereever, there ) ) perhaps I am approaching this a$$backwards. I just wanted to keep the merged array in more or less the same form as the original arrays in the sense that those values that didn't originally have a user defined key are not grouped together like those that did originally have a user defined key. thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Determine which are user defined keys?

2008-01-11 Thread Christoph Boget
ecause it's quite possible that such a key was user generated. I've gone through the docs and based on what I've read, I don't think something like this is possible but I'm hoping that's not the case. Any pointers? thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: DOMDocument->getElementById() isn't working

2008-01-07 Thread Christoph Boget
lux-cms.org/display/BLOG/GetElementById+Pitfalls > > Probably easiest to use XPath. Otherwise you have to slightly modify > your HTML... Thanks for the link. It was very informative. I've switched to using XPath and that seems to have solved my problems. Thanks for the help! thnx, Christoph

[PHP] DOMDocument->getElementById() isn't working

2008-01-04 Thread Christoph Boget
uot;\n"; } Getting the elements by tag name, while iterating through the list I see that one of the nodes has an id of 'custom'. However, when I try to get the element directly using getElementById(), it doesn't return the node properly. Am I doing something wrong? Also, as an aside, one thing that I found odd is that count( $aLayoutNodes ) shows as 1 even though more are found. Huh? thnx, Christoph

[PHP] Does a package like this exist

2008-01-04 Thread Christoph Boget
someone might be able to point me to something I might have missed. thnx, Christoph

Re: [PHP] Which file called the function?

2007-12-20 Thread Christoph Boget
t script called it. I know I can get the information from debug_backtrace but I figured there might be a better/easier way. thnx, Christoph Looking for last minute shopping deals? Find them fast with Yahoo! Se

[PHP] Which file called the function?

2007-12-20 Thread Christoph Boget
Let's say I have the following 3 files global.php one.php two.php In each case, what is echoed out for __FILE__ is global.php. Apart from analyzing the debug_backtrace array, is there any way that myFunc() would display "one.php" and "two.php" respectively? thnx, Christoph

Re: [PHP] Change case of HTML tags

2007-12-20 Thread Christoph
thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Change case of HTML tags

2007-12-19 Thread Christoph Boget
he back. Any ideas/pointers? thnx, Christoph

[PHP] Change case of HTML tags

2007-12-19 Thread Christoph Boget
he back. Any ideas/pointers? thnx, Christoph

Re: [PHP] sprintf() oddness

2007-12-02 Thread Christoph
;<br>'; echo 'round( 0.12962500, 3 ) = ' . round( 0.12962500, 3 ) . '<br>'; echo 'round( 0.11590000, 3 ) = ' . round( 0.1159, 3 ) . '<br>'; echo 'round( 0.1575, 3 ) = ' . round( 0.1575, 3 ) . '<br>'; echo 'round( 0.13387500, 3 ) = ' . round( 0.13387500, 3 ) . '<br>'; echo 'round( 0.1197, 3 ) = ' . round( 0.1197, 3 ) . '<br>'; echo 'round( 0.1525, 3 ) = ' . round( 0.1525, 3 ) . '<br>'; echo 'round( 0.12962500, 3 ) = ' . round( 0.12962500, 3 ) . '<br>'; echo 'round( 0.1159, 3 ) = ' . round( 0.1159, 3 ) . '<br>'; echo 'round( 0.07875000, 3 ) = ' . round( 0.07875000, 3 ) . '<br>'; echo 'round( 0.06693750, 3 ) = ' . round( 0.06693750, 3 ) . '<br>'; echo 'round( 0.05985000, 3 ) = ' . round( 0.05985000, 3 ) . '<br>'; echo 'round( 0.13125000, 3 ) = ' . round( 0.13125000, 3 ) . '<br>'; echo 'round( 0.13375000, 3 ) = ' . round( 0.13375000, 3 ) . '<br><br>'; Why is the behavior of round() different to that of sprintf()? Both are rounding numbers. I'll grant you that sprintf() has more utility and does more things than round() but when you are dealing with numbers (and more specifically, when you've used a numeric type specifier in the format argument), sprintf() is doing the same type of thing to the value -- rounding. So why are they doing it differently? Is that a bug? I'm reticent to say that but it doesn't make sense to me that they would behave differently. If the general rule is to round up for 5s when preceeding is odd and round down when even, that's not occuring here when using round(). thnx, Christoph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sprintf() oddness

2007-12-01 Thread Christoph Boget
's decision on the value of the 3rd significant digit? If so, why? Shouldn't rounding decisions be based on subsequent digits and not preceding ones? I am using PHP 4.3.11 thnx, Christoph

[PHP] Jobs in Frederick, MD

2007-11-13 Thread Christoph Boget
My company has the following job openings available. Be sure to check out our recruiting video at https://www.yakabod.com/join.html?nav=4. It's a pretty fun watch. :) Join in the Adventure. Yakabod, a web software and services company, is located in a beautifully restored facility in Frederick

[PHP] Benchmarking check to see if array key is set

2007-11-06 Thread Christoph Boget
Consider the following test code: '; $startTime = microtime( TRUE ); $foundCount = 0; for( $i = 0; $i <= 1; $i++ ) { $date = microtime( TRUE ); $key = rand( $date, $date * rand( 1, 5000 )); if( array key exists( $key, $myArray )) { $foundCount++; } } $e

[PHP] json_encode/json_decode, take 2

2007-10-19 Thread Christoph Boget
;50", upperValue:"70", inclusive:"BOTH"}}, Position:{Developer:{filterType:"single", fieldName:"POSITION", fieldValueLabel:"Developer", fieldValue:"Developer", constraint:"equals"}, SysAdmin:{filterType:"single", fieldName:"POSITION", fieldValueLabel:"System Admin", fieldValue:"SysAdmin", constraint:"equals"}}, 'Required Action':{'2 - GenScreen':{filterType:"single", fieldName:"REQUIRED_ACTION", fieldValueLabel:"General Phone Screen", fieldValue:"2 - GenScreen", constraint:"equals"}}}) Why isn't json_decode() converting the string to an array? Is there something extra in there that json_decode() can't deal with? I can work with it fine in javascript... :( thnx, Christoph

[PHP] Re: json_encode/json_decode

2007-10-19 Thread Christoph Boget
Please disregard. Sometimes I weep at my own stupidity... :p thnx, Christoph On 10/19/07, Christoph Boget <[EMAIL PROTECTED]> wrote: > > Please take a look at the following code and tell me what I'm doing wrong > here. I'm just not understanding why this isn't working:

[PHP] json_encode/json_decode

2007-10-19 Thread Christoph Boget
[Key 2 2] => Array ( [0] => Array ( [Key 2 2 1] => Value ) [1] => Array ( [Key 2 2 2] => Value ) ) ) ) string(245) "{"Key 1":{"Key 1 1":[{"Key 1 1 1":"Value"},{"Key 1 1 2":"Value"}],"Key 1 2":[{"Key 1 2 1":"Value"},{"Key 1 2 2":"Value"}]},"Key 2":{"Key 2 1":[{"Key 2 1 1":"Value"},{"Key 2 1 2":"Value"}],"Key 2 2":[{"Key 2 2 1":"Value"},{"Key 2 2 2":"Value"}]}}" $myArr encoded: {"Key 1":{"Key 1 1":[{"Key 1 1 1":"Value"},{"Key 1 1 2":"Value"}],"Key 1 2":[{"Key 1 2 1":"Value"},{"Key 1 2 2":"Value"}]},"Key 2":{"Key 2 1":[{"Key 2 1 1":"Value"},{"Key 2 1 2":"Value"}],"Key 2 2":[{"Key 2 2 1":"Value"},{"Key 2 2 2":"Value"}]}} $myArr decoded: Array What's going on here? Why isn't json_decode() properly decoding my string? Is there something more I need to do? Any help would be greatly appreciated! thnx, Christoph **

Re: [PHP] Beginner Tutorials for using CLASSES in PHP4

2007-10-09 Thread Christoph Boget
> > Maybe next time you'll have a challenge for me ;) And don't whine about > how I achieved what I did. Brilliant! I never would have thought of that. ;) thnx, Christoph

Re: [PHP] Players Table

2007-09-24 Thread Christoph
Players NFL_Team ( varchar32 ) Fantasy_team ( varchar32 ) I player can definitely be part of only 1 NFL Team. But how are you handling your league? Is this just for a single small group of people? Or is this database to be set up for lots of leagues? If the latter,

  1   2   >