[PHP] Format_number and input_object_tag

2007-09-19 Thread Augusto Morais

Hi,



I have 2 problems.

First: When an user type a number that have comma the numbers after of 
comma doesnt safe.


example:

the user wants save the number:

10,85


I dont know but the symfony just save the number 10. The 85 is ignored.


How i fix it ?


Second problem:


i'm trying format a number in the object_input_tag . How i do it ?



array (

  'size' => 23,
  'control_name' => 'estoque_entrada[preco_unitario]',
)); echo $value ? $value : ' ' ?>


the correct way is change the getPrecoUnitario function in 
actions.class.php ?




thanks




Augusto Morais

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] This is a bug?

2007-08-19 Thread Augusto Morais

I dont know what is happening...


Can somebody clarify the situation for me?


here is the situation:

 i have 3 files:

class.php
foo.php
bar.php

// - class.php
class globalactions {

function include_file($module) {
if ($module) {
return 
("modules/".$module."/templates/".$module.".php");
} else { return include("modules/main/templates/index.php"); }
}
}


// - foo.php
include "lib/clients.class.php";
$clients = new clients(); //instatiating the clients class


// - bar.php
include 'class.php';
$globalactions = new globalactions ();
include $globalactions->include_file("foo");  //return -> 
"modules/foo/templates/foo.php"


var_dump($clients); //will return the object



OK. All this works. but i want make some changes.

Well.. What i want to do is this:

class.php:

change the line:
return ("modules/".$module."/templates/".$module.".php");

to:
return include ("modules/".$module."/templates/".$module.".php");

and in the bar.php:


// - bar.php
include 'class.php';
$globalactions = new globalactions ();
$globalactions->include_file("foo");  //return -> "include 
modules/foo/templates/foo.php"  // OK. This works.


var_dump($clients); //i dont get the object here. I got NULL!!! why?!?!!?



problem:

When the method(include_file) return "include FILE" the $client object 
stay NULL but when the same method only return "FILE" :


include $globalactions->include_file("foo");


the $client object isnt empty.



What is happening??!?!?



I dont have any idea...


Thanks


Augusto Morais

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] variables

2007-08-19 Thread Augusto Morais

Hi,


I want create a variable based in another variable. Example:


$foo  (a simple variable);

$myvar_foo


Does it possible?


Thanks


Augusto Morais

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] is this a bug?

2007-08-19 Thread Augusto Morais

I dont know what is happening...


Can somebody clarify the situation for me?


here is the situation:

  i have 3 files:

class.php
foo.php
bar.php

// - class.php
class globalactions {

 function include_file($module) {
if ($module) {
return 
("modules/".$module."/templates/".$module.".php");
} else { return include("modules/main/templates/index.php"); }
 }
}


// - foo.php
include "lib/clients.class.php";
$clients = new clients(); //instatiating the clients class


// - bar.php
include 'class.php';
$globalactions = new globalactions ();
include $globalactions->include_file("foo");  //return ->
"modules/foo/templates/foo.php"

var_dump($clients); //will return the object



OK. All this works. but i want make some changes.

Well.. What i want to do is this:

class.php:

change the line:
return ("modules/".$module."/templates/".$module.".php");

to:
return include ("modules/".$module."/templates/".$module.".php");

and in the bar.php:


// - bar.php
include 'class.php';
$globalactions = new globalactions ();
$globalactions->include_file("foo");  //return -> "include
modules/foo/templates/foo.php"  // OK. This works.

var_dump($clients); //i dont get the object here. I got NULL!!! why?!?!!?



What is happening?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php