View Single Post
  #29  
Old 01-06-2010, 05:02 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Yes please?

PHP Code:
function repeat(char,num) {
  
temp.output "";
  for (
temp.i=0;i<num;i++) output @= char;
  return 
output;

I ran into a script earlier that made me wish there was a repeat character function. I think something like this would be useful for anyone who needs to format text.

Also, with these functions are variable names an issue? For example, if I use shared.repeat(" ",5) in a loop that also uses temp.i, is it going to break?
Reply With Quote