Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テーブルに新しい行を挿入する可変引数関数を作成したいと考えています。関数にはテーブル名、属性、その値が含まれます。テーブル内の属性は可変ではないため、可変数の引数を指定する必要があります。アイデアを提案できますか?
func_num_argsと組み合わせるとfunc_get_args、関数に提供された引数の量とその値が返されます。そのように聞こえますが、配列を使用して属性と値を受け入れる必要があります。
func_num_args
func_get_args