Disturbed One Posted November 29, 2006 Share Posted November 29, 2006 Hello,I am in the middle of coding a dynamic PDF generation script.Let's say we have these variables:[code]$input_number = 4;$output_data "---";[/code]How can I make it so that $end_result will display $output_data as many times as the input number?This would be equivalent to[code]$end_result = $output_data . $output_data . $output_data . $output_data;[/code]BUT we have to remember that this is a dynamic number, so the number of repetitions will always change.Thanks for your time,Anthony Coy Link to comment https://forums.phpfreaks.com/topic/28811-generating-content-based-on-specified-value/ Share on other sites More sharing options...
fert Posted November 29, 2006 Share Posted November 29, 2006 [code]for($count=1;$count<$input_number;$count++){$end_result.=$output_data;}[/code] Link to comment https://forums.phpfreaks.com/topic/28811-generating-content-based-on-specified-value/#findComment-131892 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.