Jump to content

Search the Community

Showing results for tags 'here document'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I'm using a here document for the html in my php page. In it I call a function to get the correct value to pass to the form and eventually to the next php page. I'm getting an error:Array to string conversion in. I'm not sure why, maybe I'm escaping the double quotes wrong? or do you need to do something special when the value being submitted is an array? This line is where the error is, the second table data in the first table row <td><input name="choice" type="radio" value=\"getCardValues($pyramid, 0,0)\" /></td> in here $output =<<< _HTML_ <!DOCTYPE html> <html> <head> <title>Pyramid Solitaire</title> </head> <body> <div class="main"> <h1>Rock Paper Scissors Game</h1> <form action="rps.php" method="post"> <input type="text" name="name"> <input type="hidden" name="past" value="0"> <table width="20%"> <tr> <td><img src="./images/cards/getCardFile($pyramid, 0,0)" width="100" height="100" /></td> <td><input name="choice" type="radio" value=\"getCardValues($pyramid, 0,0)\" /></td> </tr> for($i = 0; $i < 2; $i++) { <tr> <td><img src="./images/cards/getCardFile($pyramid, 1,$i)" width="100" height="100" /></td> <td><input name="choice" type="radio" value="getCardValues($pyramid, 1,$i)" /></td> </tr> } and so on... This is the function being called: function getCardValues($array, $row, $col) { $valuesHolder = array($array[$row][$col].getFace(), $array[$row][$col].getSuit()); return $valuesHolder; }
×
×
  • 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.