Preg_match все события в линииPhp

Кемеровские программисты php общаются здесь
Anonymous
Preg_match все события в линии

Сообщение Anonymous »

Пример (file = xref.tex) < /strong>: < /p>

This is a example string and first line with id1then,id2and with no line breaksid3.
This is a second line which has id4
< /code>

Пример (file = id) < /strong>: < /p>

id1 eqvalue1
id2 eqvalue2
id3 eqvalue3
id4 eqvalue4
< /code>

Требование: < /strong> Каждый уникальный идентификатор имеет эквивалентное значение. Мне нужно заменить это эквивалентное значение в месте идентификатора в каждом случае в файле «xref.tex». $xref=file("xref.tex");
$idfile=file("id");
for($y=0;$y

ожидаемый вывод: < /strong> < /p>

This is a example string and first line with eqvalue1then,eqvalue2and with no line breakseqvalue3.
This is a second line which has eqvalue4


Подробнее здесь: https://stackoverflow.com/questions/283 ... -in-a-line

Вернуться в «Php»