I need some advice on this file I am working on. What it is for is my OSC cart. It's this bizrate feed and while everything works the description is to long for bizrate to accept the feed so I need to limit the amount of characters it outputs. It was advise that I use the php sprintf function but I don't see how that function will limit the number of characters the file outputs. So could I get some suggestions or guidance on how to to this.
Here is the a portion of the code I am working with
preg_replace($_strip_search, $strip_replace, strip_tags( str_replace(">", "> ", $row->description) ) ) . "\t" .
Here is how the code is use in whole within the file. This isn't the entire file just part of the code where the above code is used in the file.
$output .=
$catIndex[$row->prodCatID] . "\t" .
$row->manufacturer . "\t" .
preg_replace($_strip_search, $strip_replace, strip_tags( str_replace(">", "> ", $row->name) ) ) . "\t" .
preg_replace($_strip_search, $strip_replace, strip_tags( str_replace(">", "> ", $row->description) ) ) . "\t" .
$row->product_url . "\t" .
$image . "\t" .
$row->id . "\t" .
$row->products_quantity . "\t" .
"\t" . //condition - not going to populate, optional field, populate at your own risk
$row->products_weight . "\t" .
"\t" . //ship cost - not going to populate, optional field, populate at your own risk
"\t" . //bid - not going to populate, optional field, populate at your own risk
"\t" . //Promo Des. - not going to populate, optional field, populate at your own risk
"\t" . //Other - not going to populate, optional field, populate at your own risk
$row->price . "\n";
$already_sent[$row->id] = 1;
}
If anyone can help me with this that would be great. Be gentle though I am still learning
-Thanks