I want dynamically generate yaml file:
Code: Select all
Person_User:
<? for ($i = 0; $i < 1; $i++) : ?>
User_Test_<?=$i?>:
login: test<?=$i?>
email: test<?=$i?>@gmail.com
role: admin
zip_code: 44-776
passwd: 1a1dc91c907325c69271ddf0c944bc72
first_name: Michelle
last_name: Briggs
last_login_date: 2008-02-11 06:07:45
<? endfor; ?>
Code: Select all
Person_User:
User_Test_0:
login: test0 email: test0@gmail.com
role: admin
zip_code: 44-776
passwd: 1a1dc91c907325c69271ddf0c944bc72
first_name: Michelle
last_name: Briggs
last_login_date: 2008-02-11 06:07:45
Reason: PHP don't care about white spaces after his tags.
How to avoid this unexpected behavior?
Has PHP equivalent to Ruby's -%>?