Das Ziel ist es, die Anzahl der Absätze in einer Gruppe von Benutzern Text zu zählen ...Was stimmt hier nicht mit meiner Syntax?
(I seine immer größer als 5 Absätze für diese Übung übernehmen wird)
Dann will ich das auf 1/2 Anzahl der Absätze, runden Sie ab und geben Sie einen Inhalt (echo "yehhoo"
) dazwischen ein.
verstehe ich so, wie ich bekommen habe meine $newvalue
nicht sehr gut ist, auch auf die wie Hilfe würde ...
<?php
$choppedup = explode("<p>",$node->field_long_body[0]['safe']);
$choppedpos = count($choppedup);
$choppedpos2 = $choppedpos/2;
$newvalue = floor($choppedpos2);
//I know this is working to here... the rest not so sure.
for($j = 0; $j < $choppedup; $j ++):
print $choppedup[$j];
if ($j == $newvalue):
echo "yehhoo" ;
endif;
endif;
?>
Danke
hat ausgezeichnet funktioniert. danke Ich werde das "as" erforschen ... das ist ein neues für sicher ... – fighella
Ich bin neu hier. Ich habe nicht downvote .. :) wird tho akzeptieren. Danke vielmals. – fighella
Ich weiß, du hast es nicht, du kannst nicht :) aber ich bin wirklich neugierig, was ich korrigieren sollte, um meine Antwort zu verbessern. – SilentGhost