exemple j'ai un template.php de fichier avec:comment obtenir le résultat d'un fichier php dans une chaîne
<table>
<tr>
<td><?php echo $data['nombre'] ?></td>
</tr>
<?php foreach($data['values] as $value): ?>
<tr>
<td><?php echo $value ?> </td>
</tr>
<?php endforeach; ?>
</table>
et j'ai besoin le résultat dans une chaîne $result = get_content_process('template.php',$data);
pour une utilisation dans d'autres processus.
echo $result;
<table>
<tr>
<td>Juan</td>
</tr>
<tr>
<td>Male</td>
</tr>
<tr>
<td>Brown</td>
</tr>
</table>
pourrait être utile - http://stackoverflow.com/questions/2832010/what-is-output-buffering – ajreal
Egalement en relation avec: [Modifier une fonction PHP existante pour renvoyer une chaîne] (http://stackoverflow.com/q/8730847/367456) – hakre