Jump to content

Include help


st0rmer

Recommended Posts

I am including a php file into a webpage, but the problem i am having is i want to put a limit to the number of characters before it says 'read more'

 

Its an article for my site, and it'll be on my homepage so i want it to be a certain length only before it gives the 'read more' link to the full articles

 

Does anyone know how i can set a limit to the length of the articles before it gives the read more link

 

Thanks (BTW, i am no expert in PHP, i just started it two weeks ago)

Link to comment
https://forums.phpfreaks.com/topic/73185-include-help/
Share on other sites

Heres the code:

 

<?
include('header.php');
include('variables.php');
echo $pagetitle;
echo $home;
include('header2.php');
?>
<!-- End Header 2 -->

<div class="containerbody">
<div id="subpanel">Latest</div>

<?
include ('hosting/article_name.php');
?>

<!-- End Mid Section-->

<?
include('navigation_footer.php');
?>

 

and its the hosting/article_name.php file i want to limit

 

@ Orio, how would i adapt that code with this?

Link to comment
https://forums.phpfreaks.com/topic/73185-include-help/#findComment-369171
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.