PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
function get_Posts ( ) {
// Grab $_POST data for each textfield and replace relevant parts of XML doc
$post = array($_POST);
foreach ( $post as $posted ) {
echo $posted['WHAT DO I PUT HERE?']."<br />\r\n";
}
} // END FUNCTION get_Posts ()
Because the $_POST is an array, the code obviously won't work... Aaargh. How is this done?
function get_Posts ( )
{
// Grab $_POST data for each textfield and replace relevant parts of XML doc
$post = $_POST;
foreach ( $post as $k=>$v )
{
echo $post[$k]."<br />\r\n"
} // END FUNCTION get_Posts ()
}
Last edited by JayBird on Tue Jul 18, 2006 10:18 am, edited 1 time in total.
function get_Posts($arr)
{
foreach($arr as $k => $v)
{
echo $v."<br />\r\n"; // this is the same as $post[$k]...they both return the value
}
}
get_Posts($_POST);
function get_Posts($arr) {
foreach($arr as $k => $v) {
if ($k!=="submit") {
echo $v."<br />\r\n"; // this is the same as $post[$k]...they both return the value
echo $k;
}
}
}
Thank you, my mental block has now evaporated and I shall continue to exercise the grey matter.
Anyone heard of a PHP admin interface for the "Flipping Book" flash component, BTW?