bidawinner Posted May 16, 2020 Share Posted May 16, 2020 Morning ! First Post... I've tried a number of things but not able to sort out the error ..anyone see why I am getting the non well formed numeric error?<td>{{distance($service->distance)* 0.6 }}Miles</td> and then in the framework<td><?php echo e(distance($service->distance)* 0.6); ?>Miles</td> TIA Quote Link to comment Share on other sites More sharing options...
gw1500se Posted May 16, 2020 Share Posted May 16, 2020 Without knowing what 'distance' does or '$server->distance' contains I can only guess. echo distance($service->distance); You will likely find that the result is not numeric. Quote Link to comment Share on other sites More sharing options...
bidawinner Posted May 16, 2020 Author Share Posted May 16, 2020 1 hour ago, gw1500se said: Without knowing what 'distance' does or '$server->distance' contains I can only guess. echo distance($service->distance); Suppose to change Kilometers to Miles ..it's a uber clone Quote Link to comment Share on other sites More sharing options...
gw1500se Posted May 16, 2020 Share Posted May 16, 2020 (edited) If that is the output from the echo then it is obvious you cannot multiply that string by anything. It is not numeric just as the error says. I am again just guessing but I think you want: distance($service->distance * 0.6) I don't know how you change the string 'miles' to 'kilometers'. Edited May 16, 2020 by gw1500se Quote Link to comment Share on other sites More sharing options...
bidawinner Posted May 16, 2020 Author Share Posted May 16, 2020 Thanks GW.. I don't know I am not a coder (just basic html) my developer is suppose to be taking care of this but he is never around.. I'll play around with it some more Quote Link to comment Share on other sites More sharing options...
bidawinner Posted May 16, 2020 Author Share Posted May 16, 2020 I think that did it GW ! Now I just have to find the "km" and get rid of that Quote Link to comment Share on other sites More sharing options...
bidawinner Posted May 16, 2020 Author Share Posted May 16, 2020 <td>{{distance($service->distance * 0.6 )}}Miles</td> That works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.