All Questions
733 questions
1
vote
1
answer
49
views
Unique name for first level nodes in a PHP array to XML
I am converting an array to an XML file for a real estate listing.
I am almost there but I need the same name for each property node:
always instead of the incremental key (<key_0>, <key_1&...
0
votes
2
answers
66
views
Search Value In Object PHP
I want to search title in this object and if find the title get link:
array(1) {
["item"]=>
array(13892) {
[0]=> object(SimpleXMLElement)#2 (6) {
["part"]=> ...
-1
votes
1
answer
116
views
How can I parse XML data to array using php?
I'm not to experienced with XML and I have been trying to figure this out without to much progress.
I need to get the results from the XML file to a array using PHP.
Here is the XML
<ns2:...
0
votes
0
answers
48
views
How to replace the content of my xml file in php?
I know to translate the content of my XML file. For that I extract the code with the function file_get_contents and I convert it into text with the library Html2Text. I have translated the content of ...
0
votes
1
answer
45
views
How to loop through SimpleXML Element Key Attributes using PHP [duplicate]
Can't figure out how to loop through SimpleXMLElement Attributes. Try different methods, still without success..
here is xml:
<items>
<main>
<user_id>3370</user_id>
<...
0
votes
1
answer
55
views
convert curl xml response to json or array in php
Good afternoon friends,
I need your knowledge, I have a curl php function which responds perfectly, but it has been a real headache for me to pass those results to a JSON or ARRAY, I have tried ...
0
votes
1
answer
30
views
Echo specific value of a key of an array generated from an XML
I have the following code:
$myXMLData =
"<?xml version='1.0' encoding='UTF-8'?>
<note>
<RESPONSE
xmlns='http://www.ibm.com/maximo'
xmlns:xsi='http://www.w3.org/...
0
votes
1
answer
583
views
Json encode from XML file creates empty array if element in XML is empty [duplicate]
I have a XML file, where some elements will be empty. The issue is, that this code, creates an empty array, if the element is empty. Som for the XML example below, the result from JSON_DECODE would be:...
1
vote
1
answer
60
views
Multidimensional array PHP issue
i have a problem with arrays.
Both of these [PARAM] arrays are in the same product.
I have a product feed which has parameters like this :
[PARAM] => Array (
[0] => Array (
[...
-2
votes
1
answer
29
views
PHP echo Not Outputting XML Characters
What's wrong with my PHP? I go to sandwiches.php?type=2 and all I see is cheeseavocadospinach, not the XML tags with the values.
<?php
header("Content-type: text/xml");
if ($_GET["...
0
votes
0
answers
19
views
How to pass xml variables to JS via php [duplicate]
So, I'm trying to connect my xml input to Javascript file through php(optional). I have to concatenate the xml input with all the h1 tags of my site.
I'm trying to avoid inline javascript.
This is my ...
0
votes
1
answer
89
views
I am trying to scrap website but get only one array detail in xml file
I am trying to scrape this webpage. In this webpage I have to get the job title and its location. Which I am able to get from my code. But the problem is coming that when I am sending it in XML, then ...
1
vote
1
answer
102
views
Match a value with an XML et un CSV et change it
I need to change a value in a XML (is a value of a price). I get this XML in the same repository of my file PHP.
For do that, i have 1 file XML where there is the value that i want change (there are ...
0
votes
0
answers
30
views
how to proccess some tags in xml? [duplicate]
I'm trying to read an xml and its nodes with simplexml, I can open and display it in the browser with print_r for example, but I dont get take the nodes I need , can someone help me?
I need to get the ...
0
votes
1
answer
146
views
How to return multiple values from a PHP array (PHP-XML)?
I need help extracting data from a PHP array, after which I need to create an XML tag.
I have a string as you can see below.
Sometimes there is one data, ie a picture, sometimes there are several ...