R
R
Rolros2021-10-15 01:52:03
PHP
Rolros, 2021-10-15 01:52:03

How to add php values ​​to string to generate xml feed?

There are requirements for the xml feed.
Please tell me as
an example:
there is a string, there is an xml string that should have parameters. How to form string in php php parameters id and available="true" . Opencart system. Where in php id is and available is
$output .= '<offer>';
<offer available="true" id="648053662">
$output .= '<offer>';
$product['id']
$product_info['stock_status'];

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
YankiMax, 2021-10-15
@Rolros

Well, in general, it’s certainly not kosher to do this, but since you’re using it, what’s the problem with using:
$output .= '<offer>';

$output .= '<offer available="'.var_export($product_info['stock_status'], true).' " id="'.$product['id'].'">';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question