Hi there,
I am trying to parse a plain text which contains variables. The string
looks like this:
P=1
U=test
T=ok
P=2
U=test2
T=anything
How could I create arrays out of this. To be able to access the values
like this:
echo $P[1];
parse_str does not work here and I could not find another f
Am Donnerstag, den 19.01.2006, 16:42 -0600 schrieb Richard Lynch:
> G. I forgot PHP Object printing was so primitive, even under
> var_dump. :-(
>
> function walkout($object, $indent = 0){
> if (is_object($object) or is_array($object)){
> foreach($object as $k => $v){
> echo str_r
G. I forgot PHP Object printing was so primitive, even under
var_dump. :-(
function walkout($object, $indent = 0){
if (is_object($object) or is_array($object)){
foreach($object as $k => $v){
echo str_repeat(' ', $indent), $k, ' => ';
walkout($v, $indent + 1);
}
}
el
[snipped everything]
Okay, If I'm gonna dump $xml i get a huge output put can't fin category
in there:
[Output]
object(SimpleXMLElement)#1 (1) {
["SKUlisting"]=>
object(SimpleXMLElement)#3 (3) {
["globalInfo"]=>
object(SimpleXMLElement)#4 (0) {
}
["carrierInfo"]=>
array(15)
Then var_dump($xml) and see what's in there.
The data you want is in there somewhere -- you just need to figure out
where it is.
On Thu, January 19, 2006 3:10 pm, Ron Eggler (Paykiosks) wrote:
> Am Donnerstag, den 19.01.2006, 13:51 -0600 schrieb Richard Lynch:
>> On Thu, January 19, 2006 12:08
Am Donnerstag, den 19.01.2006, 13:51 -0600 schrieb Richard Lynch:
> On Thu, January 19, 2006 12:08 pm, Ron Eggler (Paykiosks) wrote:
> > > distributor="EWI"
> > discontinued="false" cardtype="PIN" transactionType="PURC">
> .
> .
> .
> >
> > [/xml]
> >
> > and I wanna read information out of it by
On Thu, January 19, 2006 12:08 pm, Ron Eggler (Paykiosks) wrote:
> distributor="EWI"
> discontinued="false" cardtype="PIN" transactionType="PURC">
.
.
.
>
> [/xml]
>
> and I wanna read information out of it by:
> [php]
> $xml = simplexml_load_string($data);
> /* a few other things like parsing xm
yup, I finally got it parsed by simple XML, thank you!
but I got a problem, my xml-string returns many parts like this one:
[xml]
https://www.pinsprepaid.com/image.aspx?name=c38-reconex_logo.gif";
upc="870368000420">
Refer to the Reconex brochure for complete terms and condition
Simple XML *should* give you all the info somewhere in its data
structures.
If not, there are at least 2 or 3 other XML parsers that have been
built s extensions to PHP over the years.
Plus there is at least one XML parser in PEAR, and probably one or
more in PECL.
A quick search on http://php.n
Hi,
I need to parse a String like pasted below for all information (values)
those are included like 'var=value'. How can I do that? Are there any
XML-parsing functions available those'd fit for that job? I've ust found
that one (http://ca.php.net/simplexml) but it seems like i could use it
only fo
10 matches
Mail list logo