Re: [PHP] Dynamic array_merge problem
This worked wonderfully--thank you very much Jochem! On 4/12/06, Jochem Maas <[EMAIL PROTECTED]> wrote: > > Ace McKool wrote: > > Hi, > > > > This is the end result I'm trying to get: > > > > $z1 = array_merge($z[0], $z[1], $z[2]); > > $yourArrays = array($z[0], $z[1], $z[2]); > $z1 = call_user_func_array('array_merge', $yourArrays); > > obviously - you have to build $yourArray before passing it > to call_user_func_array() >
[PHP] Dynamic array_merge problem
Hi, This is the end result I'm trying to get: $z1 = array_merge($z[0], $z[1], $z[2]); But what if I don't know how many elements are in $z? I tried this (but it breaks if there are more than 2 elements in $z): for ($i=0; $i
[PHP] Re: DOM namespace prefix troubles
Thanks Rob! That solved my probem. Thanks again! On 11/2/05, Rob <[EMAIL PROTECTED]> wrote: > > Ace McKool wrote: > > > What I'm trying to create is something like the following: > > > > > > > > > > I am unable to create the "" element with the "cac:" > namespace > > prefix. Any suggestions would be appreciated! > > > > $dom = new DOMDocument("1.0", "UTF-8"); > $root = $dom->createElement('Notes'); > $dom->appendChild($root); > > $root->setAttributeNS("http://www.w3.org/2000/xmlns/";, 'xmlns:cac', > > 'urn:oasis:names:specification:ubl:schema:xsd: > CommonAggregateComponents-1.0'); > > $child = > $dom->createElementNS('urn:oasis:names:specification:ubl:schema:xsd: > CommonAggregateComponents-1.0', > > 'cac:Note'); > > $root->appendChild($child); > > Hope that helps. > > Rob > >
[PHP] DOM namespace prefix troubles
Howdy folks, I'm using PHP 5.0.5 with the DOM enabled and I'm trying to create an XML doc with PHP. The problem I'm having is attaching a namespace prefix to a tag. What I'm trying to create is something like the following: I am unable to create the "" element with the "cac:" namespace prefix. Any suggestions would be appreciated!
[PHP] Re: References and array indexes
Gabriel Birke kontor4.de> writes: > > Hello! > > The following PHP code: > $a = array("1"=>"First Element", "2"=>"Second Element"); > $v = &$a['3']; > print_r($a); > ?> > has this result: > > Array( > 1 => First Element, > 2 => Second Element, > 3 => > ) > > Can anyone give me an explanation for this? What is happening in the > guts of the PHP interpreter when it gets these instructions? > > With best regards > > Gabriel Birke > Hi ! As you passed $a in reference while defining $v, the '3' index of $a was defined. Furthermore, you didn't at any time affect a value to that '3' index of $a, but it exists because he was invocated once... So the result of your print_r isn't odd ;) Maybe you know that very well and your question was infinitely more technical, but for that I can't answer anymore ;) Ace -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XML validation with XML Schema
Matias Bagini netlabs.com.ar> writes: > > Is there any way to validate an XML with XML Schema using PHP4... I need > something like the > > bool DOMDocument->schemaValidate ( string filename) > > that exists on PHP5 > > Thanks, > > Matias. > I use an external validator called XSV. It's the official W3C validator, i guess... http://www.ltg.ed.ac.uk/~ht/xsv-status.html You'll just have to develop a little script to access it. This validator is quite useful, because he sends you back an xml log for each validation. That log describes each error. Ace -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Journal.php
www.dbzlegends.net/journal.php I made that script, but it doesn't seem to be working. I was at www.devshed.com learning PHP, when I came to the tutorial PHP101_5/page4.html. I wanted to make my own files with a form instead of pre-determining the filename and what its going to say, I figured that would be pretty much the same thing. I get no errors, however no file is made. What am I doing wrong? -- -Joe Ace http://www.dbzlegends.net";>Webmaster of Otaku Empire and http://rpg.dbzlegends.net";>Dragonball Z Legends RPG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]