Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to get attribute value in xml using php

$xml=simplexml_load_file($file);
foreach($xml->Var[0]->attributes() as $a => $b) {
    echo $a,'="',$b,""
";
}

$attr = $xml->Var[0]->attributes();
echo $attr['my_var'];
Comment

PREVIOUS NEXT
Code Example
Php :: how to change php version in cpanel 
Php :: symfony migration down 
Php :: how to check confirm password in php 
Php :: laravel collection remove empty 
Php :: get day from date php 
Php :: how to check if key is present in json in php 
Php :: get first word from string php 
Php :: return view with variable laravel 
Php :: how to convert unix timestamp to date php 
Php :: Update Query in Codeigniter Using Multiple Where Condition 
Php :: time left laravel seconds 
Php :: laravel return view in web.php 
Php :: laravel add user 
Php :: php string nach zeichen zerlegen 
Php :: bootstrap pagination laravel 
Php :: laravel get last id 
Php :: php count 
Php :: codeigniter form validation datetime 
Php :: file form validation codeigniter 
Php :: file could not be downloaded: Unable to find the wrap per "https" - did you forget to enable it when you configured PHP? failed to open stream: No such file or directory 
Php :: get current authenticated user laravel 
Php :: laravel download file from s3 
Php :: time function in php 
Php :: php xml string 
Php :: laravel vue error 500 
Php :: laravel pagination number of items 
Php :: get data of url php 
Php :: symnfony bearer token 
Php :: add controller to laravel with requests 
Php :: redirect stderr from echo 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =