how to divide a web page using php??? Please send me the coding for that???? I need it in urgent???
How to divide a web page using php?????
Moderator: General Moderators
How to divide a web page using php?????
hai everyone...
how to divide a web page using php??? Please send me the coding for that???? I need it in urgent???
how to divide a web page using php??? Please send me the coding for that???? I need it in urgent???
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: How to divide a web page using php?????
Search on "pagination"gbose wrote:hai everyone...
how to divide a web page using php??? Please send me the coding for that???? I need it in urgent???
-
prashanth.patkari
- Forum Newbie
- Posts: 1
- Joined: Thu Aug 06, 2009 8:56 am
Re: How to divide a web page using php?????
Can you send ur requirement clearly
-
peterjwest
- Forum Commoner
- Posts: 63
- Joined: Tue Aug 04, 2009 1:06 pm
Re: How to divide a web page using php?????
I doubt it.
Re: How to divide a web page using php?????
These are the two solutions I can think of at the moment for dividing a web page in two.
Oh, I'm so bad...
Edit: This post was recovered from search engine cache.
Code: Select all
<?php
$web_page = 100;
printf('%d', $web_page / 2);
?>Code: Select all
<?php
$web_page = <<<WEBPAGE
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>My Web Page</p>
</body>
</html>
WEBPAGE;
$length = strlen($web_page);
$mid_point = floor($length / 2);
$first_half = substr($web_page, 0, $mid_point);
$second_half = substr($web_page, $mid_point);
?>Edit: This post was recovered from search engine cache.
Last edited by McInfo on Wed Jun 16, 2010 4:27 pm, edited 1 time in total.
Re: How to divide a web page using php?????
gbose, I'm going to be a little nicer than some of my other friends here and explain to you that your question makes no sense. This is a PHP Developer's forum where you can get help on SPECIFIC TECHNICAL PROBLEMS related to PHP programming. We don't respond to "urgent" requests to provide code to people who don't understand PHP programming, even if we could understand what you are asking for, which we can't.
Re: How to divide a web page using php?????
Maybe we need CSS?
Dividing a web page in two can be done several ways. You can cut the code in half. Cut the information in half, or display it in two browser windows side by side each adjusted to show exactly half the page. A similar effect can also be created by taking a screen shot and cutting it up with GIMP. More technically, you can use iFrames or CSS to divide up the content of a page.
I wonder which option the poster is looking for?
Dividing a web page in two can be done several ways. You can cut the code in half. Cut the information in half, or display it in two browser windows side by side each adjusted to show exactly half the page. A similar effect can also be created by taking a screen shot and cutting it up with GIMP. More technically, you can use iFrames or CSS to divide up the content of a page.
I wonder which option the poster is looking for?
-
marty pain
- Forum Contributor
- Posts: 105
- Joined: Thu Jun 11, 2009 5:32 am
- Location: Essex
Re: How to divide a web page using php?????
I use PHP templates. Basically I divide each section of my site into separate <div>s, then save one <div> in one PHP file. Then you only have to change the content of the main <div> and include the rest to build a page.
Is that what you had in mind?
Is that what you had in mind?
Re: How to divide a web page using php?????
I found that quite funny...McInfo wrote:Code: Select all
<?php $web_page = 100; printf('%d', $web_page / 2); ?>
-
peterjwest
- Forum Commoner
- Posts: 63
- Joined: Tue Aug 04, 2009 1:06 pm
Re: How to divide a web page using php?????
I think its fair to assume he wants to divide an html document and not an integer variable. Also he didn't specify dividing it in two:
Code: Select all
function divideWebPage($filename,$divisor) {
return (file_get_contents($filename) / $divisor);
}