Dividing a text of 900 words so that the number of words in each part is 300
Using the sustar function to put another variable between them, but I failed more than once
The problem may be the Arabic language or that it counts letters and not words
$part1count=300;
$part2count=300;
$part3count=300;
$part1 = substr($page_text, 0, $part1count);
$part2 = substr($page_text, $part1count, $part2count);
$part3 = substr($page_text, $part1count + $part2count);
echo $part1;
echo $ads1;
echo $part2;
echo $ads2;
echo $part3;
echo $ads3;
Dividing a text of 900 words so that the number of words in each part is 300
YRSITE WEB is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.