explode at \n\n instead of \n

This commit is contained in:
Thomas Rubini 2023-01-26 17:09:33 +01:00
parent fc3d8e1c98
commit 7006ee6896
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ if ($O_recipe === null) {
<ol class="recipeInstructions">
<?php
if(!empty($S_recipe)) {
$steps = explode("\n", $S_recipe);
$steps = explode("\n\n", $S_recipe);
$i = 1;
foreach($steps as $step) {
echo '<li>

View File

@ -29,7 +29,7 @@ $O_recipe = $A_view["RECIPE"];
<h2>Préparation</h2>
<ol>
<?php
foreach(explode("\n", $O_recipe->S_RECIPE) as $S_instr)
foreach(explode("\n\n", $O_recipe->S_RECIPE) as $S_instr)
echo "<li>".$S_instr."</li>";
?>
</ol>