Page 1 of 1

Edit xml from php

Posted: Tue Apr 08, 2008 6:21 am
by biggipsy
Good Morning

I have one doubt , i need edit xml from php
if i have the following code

$a = $xml->no [1];

i get the "no" in line 1

but i want edit the line from a variable:

Example (dont work)

$linha = $_GET['linha'];

$a = $xml->no [$linha];


How I can edit the line?

Re: Edit xml from php

Posted: Tue Apr 08, 2008 8:38 am
by Rovas
SimpleXML read the example 8: you have to put the path to value which you want to modify than give it a new value.