PHP Export in Excel, if there is a row in the database column of the line, then the corresponding in Excel to change the number of lines, how to solve?

Source: Internet
Author: User
Tags ranges
PHP Export in Excel, if there is a row in the database column of the line, then the corresponding in Excel to change the number of lines, how to solve?
The code is as follows:
 
  


Reply to discussion (solution)

Test example

Header ("Accept-ranges:bytes"); Header ("Content-type:application/vnd.ms-excel"); Header ("Content-disposition: Attachment Filename= ". @ $filename); $ar = Array (  " abcd123 "," another line of newline and  then line "), echo" t \ n "," foreach "($ar as $k = + $v) {  echo "$k \t\" $v \ "\ n";}

Test example

Header ("Accept-ranges:bytes"); Header ("Content-type:application/vnd.ms-excel"); Header ("Content-disposition: Attachment Filename= ". @ $filename); $ar = Array (  " abcd123 "," another line of newline and  then line "), echo" t \ n "," foreach "($ar as $k = + $v) {  echo "$k \t\" $v \ "\ n";}



Is it used to count down from the database or not? Are your codes double-quoted?

Test example

Header ("Accept-ranges:bytes"); Header ("Content-type:application/vnd.ms-excel"); Header ("Content-disposition: Attachment Filename= ". @ $filename); $ar = Array (  " abcd123 "," another line of newline and  then line "), echo" t \ n "," foreach "($ar as $k = + $v) {  echo "$k \t\" $v \ "\ n";}



Sorry, just entered the wrong character, you are very useful, thank you.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.