php - Convert Object to String -
I have an object that gets a string I want to compare it to string and I do not know how to To do. My source is something like this:
  $ field = $ this-> Form- & gt; GetFieldset ('profile'); $ Website = "web site"; If ($ Field-> Label == $ website) {Echo "Good"; } Else {"bad" echo; }   
 This problem is not really understood, but you can call it a You can convert the array to  get_object_vars . 
Is it assuming that $ field-> label is actually a property rather than an object?
  $ field = $ this-> Form & gt; GetFieldset ('Profile'); $ Website = "web site"; $ Array = get_object_vars ($ field); If ($ array ['label'] == $ website) {echo 'hoorah!'; }   
Comments
Post a Comment