HTMLコードの文字列があります。このhtmlコード内に、htmlコードを小さなチャンクに分割するのに役立ついわゆる「html区切り文字」があります。
区切り文字は次の形式です。
<br class="limit" />
htmlコードは以下の通りです
<p>To be A Premier in Global Distinction<br class="limit" />To be A Premier Polytechnic of Global Distinction <br class="limit" />We provide quality education and training to prepare students and adult learners for work and life, equipping them to be life-long learners <br class="limit" />We will harness our resources, expertise, creativity and innovation to support the development of business and industry.</p>
これは私のphpコードです
$htmlparts = explode("<br class='limit' />", $htmlcode);
echo $htmlparts [0];
echo $htmlparts [1];
echo $htmlparts [2];
正しくは$htmlparts[0]は私を返すはずです
Global Distinctionのプレミアになるには、$htmlparts[1]が私をGlobalDistinctionのプレミアポリテクニックになるように返す必要があります。
それによって分割に失敗します。専門家のアドバイスに感謝します。ありがとう!