Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <file_allegati>
- <allegato id="0" planimetria="0" type="foto">
- <id>0</id>
- <file_path>https://##.jpg </file_path>
- </allegato>
- <allegato id="1" planimetria="1" type="planimetria">
- <id>1</id>
- <file_path>https://##.jpg </file_path>
- </allegato>
- </file_allegati>
- function set_planimetrie( $allegati ) {
- $result="";
- $xml = new SimpleXMLElement($allegati);
- foreach($xml->children() as $allegato)
- {
- if($allegato['type']=='planimetria' && $allegato['planimetria']==1){
- if( $result != ''){$result .=',';}
- $result.= $allegato->file_path;
- }
- return $result;
- }
- }
Add Comment
Please, Sign In to add comment