Jump to content
php.lv forumi

function


haardys

Recommended Posts

Ieteikumi būtu sākt ar sakarīgāku topika nosaukuma izdomāšanu. Un arī ar pastāstīšanu, ko nozīmē "negrib strādāt", un ko nozīmē funkcija parastā htmlā.

function tatata (){

echo "<option value=\"viens\">viens</option>";

$sql = mssql_connect ("SERVER", DB_USER, DB_PASSWORD) or die ("Could not connect to database: ".mssql_get_last_message());

mssql_select_db("baze1",$sql);

$result = mssql_query("SELECT lauks1,lauks2 FROM View");

while ($iekl = mssql_fetch_object($result)){

echo "<option value=\"$iekl->lauks1\">".substr($iekl->lauks2,0,25)."</option>";

}

 

mssql_close($sql);

}

?>

nu lūk f-ja..

parastā htmlā to iekļaut no problems, resp <? function tatata();?>

bet kā to izdarīt iekš php?

Link to comment
Share on other sites

nesaprotu kur rodas tadi :D

tiesam, veci tak pirms raksti šeit, no sākuma pārbaudi vai nevari uziet info, teiksim es parasti daru šādi

 

1. mani interesē funkcijas

2. www.php.net/function

3. opā atradu komentāru kā to darīt

 

1. mani interesē masīvi

2. www.php.net/array

3. opā atradu kā to darīt..

 

echo "<html><head>".mans_head_func()."</head><body>".mans_lapas_func()."</body></html>";

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...