Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:23:44+00:00 2026-05-31T21:23:44+00:00

Hi I have a problem in sending data from php to pdf. I think

  • 0

Hi I have a problem in sending data from php to pdf. I think the only way is to put in a variable the data that will be send to pdf function.
here is the code that i need to put in a php variable..

<table width="95%" height="95%">
            <tr>
                <td align="center">
                  <table width="100%" border="0" cellpadding="2" cellspacing="2">
                    <tr align="center">
                      <td colspan="7" bgcolor="#2561cf" style="color:#FFFFFF"><strong><?php echo $monthNames[$cMonth-1].' '.$cYear; ?></strong></td>
                    </tr>
                    <tr>
                      <td align="center" bgcolor="#2561cf" style="color:#FFFFFF"><strong>Sun</strong></td>
                      <td align="center" bgcolor="#2561cf" style="color:#FFFFFF"><strong>Mon</strong></td>
                      <td align="center" bgcolor="#2561cf" style="color:#FFFFFF"><strong>Tue</strong></td>
                      <td align="center" bgcolor="#2561cf" style="color:#FFFFFF"><strong>Wed</strong></td>
                      <td align="center" bgcolor="#2561cf" style="color:#FFFFFF"><strong>Thu</strong></td>
                      <td align="center" bgcolor="#2561cf" style="color:#FFFFFF"><strong>Fri</strong></td>
                      <td align="center" bgcolor="#2561cf" style="color:#FFFFFF"><strong>Sat</strong></td>
                    </tr>

                    <?php 
                        $timestamp = mktime(0,0,0,$cMonth,1,$cYear);
                        $maxday    = date("t",$timestamp);
                        $thismonth = getdate ($timestamp);
                        $startday  = $thismonth['wday'];

                      for ($i=0; $i<($maxday+$startday); $i++) {
                        $day = ($i - $startday + 1);
                        if($day['1'] == '1' || $day['1'] == '2' || $day['1'] == '3' || $day['1'] == '4' || $day['1'] == '5' || $day['1'] == '6' || $day['1'] == '7' || $day['1'] == '8' || $day['1'] == '9'){
                            $day    = '0'.$day;
                        }else{
                            $day    = $day;
                        }
                        $date = $monthNames[$cMonth-1].' '.$day.', '.$cYear;
                        $date2 = $cMonth.'/'.$day.'/'.$cYear;
                        $events = $this->getEvents($date2);
                        if(($i % 7) == 0 ) echo "<tr>\n";
                        if($i < $startday) echo "<td></td>\n";
                        else echo "<td valign='top' align='left' width='50px' height='50px'><div class='".$dateId."' id='".$date."' title='".$date2."' style='cursor:pointer;'>". ($i - $startday + 1) .'</div>'. $events."</td>\n";
                        if(($i % 7) == 6 ) echo "</tr>\n";
                      }  
                     ?>
                  </table>
                </td>
            </tr>
         </table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:23:45+00:00Added an answer on May 31, 2026 at 9:23 pm

    It is possible just try concatenate the loop of just put your code inside a function.
    Ex.

    function test(){
        echo '{the code}';
    
    }
    
    $var = test(); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a php script that will fetch data from a given URL and
I have problem with fancybox. I want to write a function that will run
I have a PHP script that works by calling items from a database based
I have developed a facebook application in which I am sending data from Flash
I have this code just to send data from already loaded jqGrid: jQuery(#bedata).click(function(){ //Function
I have problem in some JavaScript that I am writing where the Switch statement
I have problem when I try insert some data to Informix TEXT column via
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
Im using jQuery getJSON method to get data from my database via some php
I am having difficulties sending the UDID from the iPhone to a PHP script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.