itemprop = "text">
In my display () the method setting value using stable initPost () and using all prices get stable and stable value Get a single value ('email') method. When I am using var_dump () then everything is fine. I want to believe in my list. But I'm getting only the first string of each value. But when I do this (with the static method with getting full value in my list) What's the problem?
Public function display () {echo ""; Form :: initPost ()); // Start value var_dump (form :: getAll ()); // Getting all values var_dump (form :: get ('email')); // Only email value list ($ name), $ email, $ pass, $ rps, $ phone) = form :: getAll (); // value to var_dump ($ name); // Listing on; Here's the problem. Receiving the first string only with the full name}
This is my form class:
class form {personal fixed $ value = array}; Public stable work initPost () {foreach ($ _ POST $ key = & gt; $ value) self: $ value [$ key] = $ value; } Public stable work getAll () {returns self :: $ value; } Get public stable work ($ value) {self: $ value = $ _POST [$ value]; Return self: $ value; }}
// This is the output section
var_dump (form :: getAll ()); // Getting all the value arrays (5) {["name"] = & gt; String (12) "Bristy Bela" ["Email"] = & gt; String (16) "bristi@gmail.com" ["pass"] = & gt; String (6) "123456" ["rpass"] = & gt; String (6) "123456" ["phone"] = & gt; String (6) "123456"} // Received email value var_dump (form :: get ('email')); String (16) "bristi@gmail.com" var_dump ($ name); // Only getting the first string with the full name But the full name string is descripted (1) "b"
No comments:
Post a Comment