Edit xml from php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
biggipsy
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 6:07 am

Edit xml from php

Post 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?
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: Edit xml from php

Post 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.
Post Reply